VB中的DIR函数

解决方案 »

  1.   

    DeleteFile(App.Path & "\Data\Filename.txt")
      

  2.   

    判断还是用Dir函数,像这样:
    if Dir(App.Path + "\Data\Filename")<>"" then 存在 else 不存在understand?
      

  3.   

    如果你安装了MSDN,将光标停在dir上面按F1……
      

  4.   

    两种方法:
    1。if dir("文件路径") <>"" then ....
    2.引用filesystemobject 
      dim fso as new filesystemobject
       ....
      if fso.fileexists("文件路径") then ....
      

  5.   

    dir()不支持网络的绝对路径,访问网上邻居的文件时会出错