does a file exist?

J

Junior

I want to check if a file exists and then take an action.
what is the correct way to determine if a certain file exists?
say if i wanted to know if this file was present?
V:\Data\Letterone.txt
thanks
 
R

Ron Weiner

Take a look at the Dir() command. Dir("V:\Data\Letterone.txt") will return
Letterone.txt if the file exists and an empty string if the file does NOT
exist.

Ron W
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top