UtterAccess HomeUtterAccess Wiki

Welcome Guest ( Log In | Register )

Custom Search
Edit Discussion
> DirectoryExists    

A quick and simple implementation of checking for the existance of a directory using the Dir() function with the vbDirectory attribute. Note that this is not foolproof... if a file exists in a directory, and you pass that filename, the function will return true. See the VBA Dir() help file for further details.

CODE
Public Function DirectoryExists(strDirectoryName As String) As Boolean
 DirectoryExists = Len(Dir(strDirectoryName, vbDirectory))
End Function

SeeAlso: FileExists


Creative Commons License
DirectoryExists by UtterAccess Wiki is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Editing and revision of the content is freely encouraged; for details, see Expected Usage.

Edit Discussion
Custom Search
Thank you for your support!
This page has been accessed 2,428 times.  This page was last modified 10:18, 10 September 2012 by Jack Leach.   Disclaimers