Dim fso as  New FileSystemObject 
fso.FileExists(文件路径)=True 文件存在反之不存在 
fso.FolderExists(路径)=True 文件夹存在反之……

解决方案 »

  1.   

    1) if len(dir(file)) then 文件存在 else 文件不存在2) on error goto fileerr
        open file for input as #1
        文件存在
        goto Exit
        fileerr:
        文件不存在
        exit:
        close #13) API:
       CreateFile, OpenFile
      

  2.   

    as james0001, especially 1) if len(dir(file)) then 文件存在 else 文件不存在
      

  3.   

    If Len(Dir("c:\windows\*.*")) > 0 Then
            MsgBox "目录已经存在"
        Else
            MsgBox "目录不存在"
        End If