I have code that 'worked' as follows on a Windows 2000 machine. I upgraded to Windows XP with SP2 and now it can't find any files. I am looking for ZIP files. When I change the extension to be anything ~other~ than ZIP then it can find files like crazy. If I search for "*" (astersik) and the directory only contains zip files it says it found no files. If I rename a ZIp file to a DIP file then it finds it.
Does anyone know how to make Windows XP return ZIP files to a filesearch? (we also have WinZip 9.0 installed)
Here is my code:
Set fs = Application.FileSearch
.LookIn = "G:\MyFiles\"
.FileName = "*.zip"
.SearchSubFolders = True
If .Execute(msoSortByFileName, msoSortOrderDescending, True) > 0 Then
MsgBox "There were " & .FoundFiles.count & " file(s) found."
MsgBox "There were no files found."