Results 1 to 3 of 3

Thread: Check if a file exists?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 1999
    Location
    Leeds, UK
    Posts
    287

    Question

    Hi,

    I would like to check if the file C:\Readme.txt exists. I know an API call is needed here because I once knew how to do it but I've now forgot. Could someone please help me? Thanks!
    rino_2
    Visual Basic, HTML
    Please Visit my Site: Richard's VB Site

  2. #2
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088
    API call? For such a thing? hm...
    Code:
    If Not Dir("C:\Readme.txt") = "" Then
       'File exists
    EndIf

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 1999
    Location
    Leeds, UK
    Posts
    287

    Cool

    Thanks for the help Fox! I thought it was an API but I was wrong.
    rino_2
    Visual Basic, HTML
    Please Visit my Site: Richard's VB Site

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