Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default File searh *.cab

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default File searh *.cab

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.

--
Regards,
Tom Ogilvy


"Paul Ho" wrote:

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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default File searh *.cab

Hi, Tom,

Thanks for you help.


"Tom Ogilvy" wrote:

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.

--
Regards,
Tom Ogilvy


"Paul Ho" wrote:

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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
File:1 and File:2 -- Double Files when Opening One File dallin Excel Discussion (Misc queries) 1 January 25th 07 02:53 AM
I saved file A over file B. Can I get file B back? Lynn Excel Discussion (Misc queries) 2 May 12th 06 11:24 AM
opening an excel file opens a duplicate file of the same file skm Excel Discussion (Misc queries) 1 December 7th 05 05:52 PM
I SAVED A FILE OVER ANOTHER A FILE IN EXCEL. THE OLD FILE WAS AN . DUFFER8MCD Excel Discussion (Misc queries) 1 December 23rd 04 11:32 PM
i received a file that reads powerpoint document file file exten. CCAROLACEREC Excel Discussion (Misc queries) 1 December 4th 04 05:02 PM


All times are GMT +1. The time now is 07:12 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"