Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I want to use Application.FileSearch to search for xls files in the second
level of a folder structure. I have many folders with the target xls files in each folder. But then an 'archive' folder attached to the folder with more xls files with the same name. Everytime it searches I end up with the main file and the archive file. Due to the number of folders, I need to use the .SearchSubFolders = True property, but is there any way of telling it to only go down one level? Level 1 |__ Level 2... | |__ ****.xls - WANT TO SEARCH THESE | |__ Level 3... | |__ ****.xls - NOT THESE |__ Level 2... |__ Level 2... The extract of code I have is: With Application.FileSearch .NewSearch .LookIn = "c:\temp\amp test" .Filename = "933_????.xls" .SearchSubFolders = True .FileType = msoFileTypeExcelWorkbooks If .Execute() 0 Then ......................blah blah blah Any help on this would be great, thanks. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Application.FileSearch | Excel Discussion (Misc queries) | |||
Help with Application.FileSearch method | Excel Programming | |||
Application.FileSearch crashed Excel in Windows 2K | Excel Programming | |||
Application.FileSearch is not working?? | Excel Programming | |||
VBA Application.FileSearch | Excel Programming |