Find if a specific path exists on harddrive

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'd like to find out if a specific path exists before using Basic to write a
file to that path. Is there some way to check whether a path exists?
 
Try this

If Len(Dir("C:\DirName", vbDirectory)) = 0 Then 'Doesn't exist
MkDir "C:\DirName" ' will create the dir
End If
 
Back
Top