Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 186
  • Last Modified:

Verifying an empty directory exists...

I need to verify that a directory exists (even if it's empty). Does DIR() only work at file level as I don't seem to be able to get it to recognise an empty dir. It appears to work if the dir contains one or more files, but my program needs empty directories.
0
lbowers
Asked:
lbowers
1 Solution
 
clifABBCommented:
If Dir("c:\Test1", vbDirectory) <> "" Then
  'The Directory exists
End If

0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now