-
In my code I need to be able to search for a directory to find out if it is created or not and if not then I need to create it. The create part is not a problem. I have been fighting with this for a couple of days now and I'm getting nowhere. Thanks for the help.
-
Code:
If Dir$("c:\myDir", vbDirectory) <> "" Then
'the dir exists
else
'it doesn't
End if
-
Thank you very much. Will this code search down into subdirectories??
-
No. It will tell you if a directory exists at the exact location specified.
if you ask for "C:\mydir" or "C:\myDir\AnotherDir" then it will tell you if that exists. It will not tell you if mydir exists anywhere else.
-
-
Kedaman thanks for the information. I'm going to try it out.