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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

If file exist

Status
Not open for further replies.

shanmugham

Programmer
Jun 19, 2001
71
IN
what is the equivalent command for
if file exist ?? ...if("c:\abc\xyz.txt") its o.k.

thanks in advance
shan
 
Just use the Dir command.

If Len(Dir("c:\abc\xyz.txt")) > 0 Then 'You've got it
Else 'It's not there
End If

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'People who live in windowed environments shouldn't cast pointers.'
 
U can create the FileSystemObject
And then use it fileexists method

Good Luck
Vikram
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top