 |
| File Info |
| Version : |
1.0.0 |
| Support Topic : |
Click Here (0 comments) |
| Demo : |
N/A |
| Screenshot : |
N/A |
| Post Date : |
Apr 11, 2005 |
| Last Edit Date : |
Apr 11, 2005 |
| Language Version : |
VB5, VB6 |
| Current Rating : |
N/A |
|
| Author Info |
|
|
|
| Code Description |
| Two functions to check if a folder exists and
another to check if a folder is empty
|
| Download Info |
|
|
| User Feedback |
|
|
|
| VB Code |
Public Function FolderExists(ByVal strPath As String) As Boolean
Dim s As String
If Right(strPath, 1) = "\" Then strPath = Left(strPath, Len(strPath) - 1)
s = Dir(strPath, vbDirectory)
If s <> "" Then FolderExists = True
End Function
Public Function IsFolderEmpty(ByVal strPath As String) As Boolean
Dim s As String
If Right(strPath, 1) <> "\" Then strPath = strPath & "\"
s = Dir(strPath, vbNormal Or vbDirectory)
IsFolderEmpty = True
Do While s <> ""
If s <> "." And s <> ".." Then
IsFolderEmpty = False
Exit Do
End If
s = Dir
Loop
End Function |
|
|
|
 |
 |