'-----------------------------------------------------------
' FUNCTION: DirExists
'
' Determines whether the specified directory name exists.
' This function is used (for example) to determine whether
' an installation floppy is in the drive by passing in
' something like 'A:\'.
'
' IN: [strDirName] - name of directory to check for
'
' Returns: True if the directory exists, False otherwise
'-----------------------------------------------------------
'
Public Function DirExists(ByVal strDirName As String) As Integer
Const strWILDCARD$ = "*.*"
Dim strDummy As String
On Error Resume Next
AddDirSep strDirName
strDummy = Dir$(strDirName & strWILDCARD, vbDirectory)
DirExists = Not (strDummy = vbNullString)
Err = 0
End Function
Share:
These icons link to social bookmarking sites where readers can share and discover new web pages.
