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
 

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

Back
Top