Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help on this code please
Can someone tell me why this won't find .zip files? It finds EVERY other
types, including some program specific files with non-Microsoft extentions. - the only ones it won't find are zip files. Sub Find() With Application.FileSearch .NewSearch .LookIn = "d:\Data" .SearchSubFolders = True .MatchTextExactly = False .FileType = msoFileTypeAllFiles If .Execute() 0 Then MsgBox "There were " & .FoundFiles.Count & " file(s) found." For i = 1 To .FoundFiles.Count Cells(i, 1).Value = .FoundFiles(i) Cells(i, 2).Value = FileDateTime(.FoundFiles(i)) Cells(i, 3).Value = FileLen(.FoundFiles(i)) Next i Else MsgBox "There were no files found." End If End With End Sub Thanks! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help on this code please
Tom,
I beleive I read somewhere that XP views .zip files as folders so this code won't return them. Sorry I can't remember the answer. Mike "Tom" wrote: Can someone tell me why this won't find .zip files? It finds EVERY other types, including some program specific files with non-Microsoft extentions. - the only ones it won't find are zip files. Sub Find() With Application.FileSearch .NewSearch .LookIn = "d:\Data" .SearchSubFolders = True .MatchTextExactly = False .FileType = msoFileTypeAllFiles If .Execute() 0 Then MsgBox "There were " & .FoundFiles.Count & " file(s) found." For i = 1 To .FoundFiles.Count Cells(i, 1).Value = .FoundFiles(i) Cells(i, 2).Value = FileDateTime(.FoundFiles(i)) Cells(i, 3).Value = FileLen(.FoundFiles(i)) Next i Else MsgBox "There were no files found." End If End With End Sub Thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
split post code (zip code) out of cell that includes full address | Excel Discussion (Misc queries) | |||
Shorten code to apply to all sheets except a few, instead of individually naming them, and later adding to code. | Excel Programming | |||
Protect Sheet with code, but then code will not Paste error. How do i get around this. Please read for explainations.... | Excel Programming | |||
Excel code convert to Access code - Concat & eliminate duplicates | Excel Programming | |||
stubborn Excel crash when editing code with code, one solution | Excel Programming |