Results 1 to 5 of 5

Thread: How to check if a file exist

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2000
    Posts
    11
    How do I check if a file exists, _besides_ using Dir$(), as using Dir sometimes gives an error (especially when the path give is too long, i think).

  2. #2
    Frenzied Member
    Join Date
    Jun 2000
    Location
    England, Buckingham
    Posts
    1,341
    File System ??

  3. #3
    Frenzied Member
    Join Date
    Aug 2000
    Location
    O!
    Posts
    1,177
    I seem to remember seeing a reply to this same question within the past month. I believe the solution used API calls. Try searching the older posts.

  4. #4
    Guest

    Found it!!!!!

    I think I have found just what you are after - Take a look : -

    http://www.planetsourcecode.com/xq/A...s/ShowCode.htm

    Hope this helps

  5. #5
    Member
    Join Date
    May 2000
    Location
    Canada
    Posts
    52
    Make reference to Microsoft Scripting Runtime


    option Explicit
    private Sub Form_Load()
    Dim fso as FileSystemObject
    set fso = new FileSystemObject
    If fso.FileExists("C:\Programing\David\database.ini") then' Put your file name in here
    MsgBox "Found"
    else
    MsgBox "Not Found"
    End If
    End Sub





Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width