Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Application.FileSearch | Excel Discussion (Misc queries) | |||
FileSearch in a combo box | Excel Discussion (Misc queries) | |||
FileSearch doesn't find zip files | Excel Programming | |||
FileSearch Code | Excel Programming | |||
FileSearch Problem | Excel Programming |