Link to home
Start Free TrialLog in
Avatar of hess
hess

asked on

checking existance of files

How would I go about seeing if a file exists?
ASKER CERTIFIED SOLUTION
Avatar of dr00py
dr00py

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dr00py
dr00py

You can check if a file exists with a simple Dir command.
If the result is empty .. The file doesn't exist.
Another way is to check it's attributes using the getattr function.

Avatar of hess

ASKER

Thank You I was unaware of the dir function. Before i had been trying to use the on error statement and perposely cause errors but that wasn't behaveing nicely.