File searh *.cab

P

Paul Ho

Hello,
I have *.cab file c:\temp. But why I couldn't search *.cab with below code
?It shown me all files but excluded *.cab? Please help, thanks.

With Application.FileSearch
.LookIn = "C:\temp"
.Filename = "*.*"
.SearchSubFolders = True

If .Execute(SortBy:=msoSortByFileName, _
SortOrder:=msoSortOrderAscending) > 0 Then

MsgBox "Number of *.txt was found: " & .FoundFiles.Count
Debug.Print "---Number of file found : " & .FoundFiles.Count

For i = 1 To .FoundFiles.Count
Debug.Print .FoundFiles(i)
Next i

Else 'exit program if no file was found
MsgBox "There were no files was found! Please check"
End
End If

End With
 
T

Tom Ogilvy

worked fine for me in Windows XP, Excel 2003

C:\Program Files\OfficeUpdate11\500200_0x00000409.des
C:\Program Files\OfficeUpdate11\500200_bitmask.as
C:\Program Files\OfficeUpdate11\500200_inventory.as
C:\Program Files\OfficeUpdate11\ident.cab
C:\Program Files\OfficeUpdate11\ident.ini
C:\Program Files\OfficeUpdate11\oudetect.cab
C:\Program Files\OfficeUpdate11\oudetect.dll

There have been reports of fileSeach being flakey on some types of files or
flakey in general and it has been removed in xl2007.

Try using the dir command.
 
P

Paul Ho

Hi, Tom,

Thanks for you help.


Tom Ogilvy said:
worked fine for me in Windows XP, Excel 2003

C:\Program Files\OfficeUpdate11\500200_0x00000409.des
C:\Program Files\OfficeUpdate11\500200_bitmask.as
C:\Program Files\OfficeUpdate11\500200_inventory.as
C:\Program Files\OfficeUpdate11\ident.cab
C:\Program Files\OfficeUpdate11\ident.ini
C:\Program Files\OfficeUpdate11\oudetect.cab
C:\Program Files\OfficeUpdate11\oudetect.dll

There have been reports of fileSeach being flakey on some types of files or
flakey in general and it has been removed in xl2007.

Try using the dir command.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top