How can I know if a file or a directory exists or not?
Thank you!
Best Regards,
Kevin Shen
Printable View
How can I know if a file or a directory exists or not?
Thank you!
Best Regards,
Kevin Shen
refer
http://vblib.virtualave.net
there is a function call IsFileExist in vbFileIO class.
from there, you would probably find out how to crate your own function to check the directory existance.
hope this help.
An easiest way -provided you know what you are looking for- is the following:
if dir("myfile.exe")<>"" then... 'the file exists, or there is a directory with same name as file
if dir("mydir",vbdirectory)<>"" then... 'a directory exists
Special thanks to Lothar "the Great" Haensler. Come back soon, you Guru.