Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Wasiest way to check if a file exists? 1

Status
Not open for further replies.

elziko

Programmer
Nov 7, 2000
486
GB
I have a text file in c:

I want to check to see if it exists and do someting if it doesn't.

I looked thru the help file and the only way I can think of doing this is by opening it and having something happen on a file open error.

There must be a better way?

TIA

elziko
 
If Dir(yourfile) <> &quot;&quot; then
:)
Else
:-(
End If
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top