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 derfloh 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
Joined
Jun 19, 2001
Messages
71
Location
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
 
faq222-3657

Swi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top