EnumSubDir



'Da richiamare come segue:

Call ListSubDirs("C:\")
Sub ListSubDirs(strPath As String)
Dim strFile As String
If Right(strPath, 1) <> "\" Then
strPath = strPath & "\"
End If
If IsAttr(strPath, vbDirectory) Then
strFile = Dir(strPath, vbDirectory)
Do Until strFile = ""
If IsAttr(strPath & strFile, vbDirectory) Then
If strFile <> "." And _
strFile <> ".." Then
Debug.Print strFile
End If
End If
strFile = Dir
Loop
End If
End Sub


(enumsubdir.html)- by Paolo Puglisi - Modifica del 25/3/2019