Results 1 to 3 of 3

Thread: Checking for file existence

  1. #1
    manuman
    Guest

    Checking for file existence

    Can anyone give me a bit of code to check for the existence of a file?

    Thanks

    ManUman

  2. #2
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923
    Use the multi-talented Dir() function
    VB Code:
    1. If Len(Dir("C:\autoexec.bat")) > 0 Then
    2.     MsgBox "Exits!"
    3. Else
    4.     MsgBox "Doesn't exist!"
    5. End If

  3. #3
    manuman
    Guest

    Thanks

    Thanks for helping me out.

    ManUman

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