H
Hub van de Laar
L.S.
I encountered some problems using the FileSearch object.
Using the Macro you'll find below, it doesn'list the zip-
files that reside in the specified directory. When
replacing the Filename "*.zip" by "*.*", it lists all
files except the zip-files.
I've already reviewed the contents of the collections
PropertyTests and FileTypes, but had no results.
Using the interactive FileSearch from the Excel-sheet via
the menu-option provides the same results.
Private Sub CheckAllZipFiles()
Dim FS As FileSearch, I As Integer
With Application.FileSearch
.NewSearch
.LookIn = "D:\"
.FileType = msoFileTypeAllFiles
.Filename = "*.zip"
.SearchSubFolders = True
If .Execute > 0 Then
For I = 1 To .FoundFiles.Count
Debug.Print .FoundFiles(I)
Next I
Else
MsgBox "No files found."
End If
End With
End Sub
I encountered some problems using the FileSearch object.
Using the Macro you'll find below, it doesn'list the zip-
files that reside in the specified directory. When
replacing the Filename "*.zip" by "*.*", it lists all
files except the zip-files.
I've already reviewed the contents of the collections
PropertyTests and FileTypes, but had no results.
Using the interactive FileSearch from the Excel-sheet via
the menu-option provides the same results.
Private Sub CheckAllZipFiles()
Dim FS As FileSearch, I As Integer
With Application.FileSearch
.NewSearch
.LookIn = "D:\"
.FileType = msoFileTypeAllFiles
.Filename = "*.zip"
.SearchSubFolders = True
If .Execute > 0 Then
For I = 1 To .FoundFiles.Count
Debug.Print .FoundFiles(I)
Next I
Else
MsgBox "No files found."
End If
End With
End Sub