'Search a dir and subdirectories for a specific file pattern
Private Sub GetFiles(sPath As String)
Dim fso As Object
Set fso = CreateObject("Scripting.FileSystemObject")
Dim sFilename As String
Dim fld
If fso.FolderExists(sPath) Then
sPath = sPath & IIf(Right$(sPath, 1) <> "\", "\", "")
sFilename = Dir(sPath & "*.exe")
Do While Len(sFilename)
List1.AddItem sPath & sFilename
sFilename = Dir
Loop
For Each fld In fso.GetFolder(sPath).SubFolders
GetFiles fld.Path
Next
End If
End Sub
Private Sub Command1_Click()
Call GetFiles("C:\")
End Sub
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen