用filesystem对象中的fileExist方法。

解决方案 »

  1.   

    用filesystem对象中的fileExist方法。
      

  2.   

    用FindFirst和FindNext桌个目录查找即可
      

  3.   

    on error resume next
    用open 文件
    close
    判断 err.Number 是否=0
      

  4.   

    如何设定objfilesys
    set objFilesys=Server.createobject("FileSystemObject")
    怎么不对
      

  5.   

    不要前面的Server.。
        Dim objFS       As Object   
        Set objFS = CreateObject("Scripting.FileSystemObject")
        If objFS.FileExists(filespec) Then
            ...
        else
           ...
        endif
        set objfs=nothing
      

  6.   

    if Dir(YourFilePathFileName)<>"" Then
    文件存在ORIf FindFirstFile(YourFilePathFileName)<>-1 then
    文件存在
      

  7.   

    可以考虑使用下面的函数Public Function FileExists%(FileName$)Dim f%   ' Trap any errors that may occur
       On Error Resume Next   ' Get a free file handle to avoid using a file handle already in use
       f% = FreeFile
       ' Open the file for reading
       Open FileName$ For Input As #f%
       ' Close it
       Close #f%
       ' If there was an error, Err will be <> 0. In that case, we return False
       FileExists% = Not (Err <> 0)End Function
      

  8.   

    lcooky(今夜无雪)的方法简直是浪费!lcooky(今夜无雪)的方法简直是浪费!lcooky(今夜无雪)的方法简直是浪费!lcooky(今夜无雪)的方法简直是浪费!lcooky(今夜无雪)的方法简直是浪费!lcooky(今夜无雪)的方法简直是浪费!