Application.FileSearch Wont Find ZIP Files ???

mr_e_landis

Registered User.
Local time
Today, 03:47
Joined
Feb 16, 2005
Messages
28
This is the gist of what I have been running and what seams to be not working.

Code:
With Application.FileSearch
    .NewSearch
    .LookIn = f.Path
    .SearchSubFolders = True
    .FileName = "*"
    .Execute
    FileCount = .FoundFiles.Count
End With

The problem I just discovered is that it will not find .zip files :confused:

I've even tried using a .FileName = "*.zip" and still no .zip files are found...

The full story is quite complicated and hard to explain. But I'm basically creating a cataloging system that will document what files are on what DVD archives. There is one directory that I specify, usually "DVD0001, DVD0002, Etc..." In that directory I dump an infinite amount of files and folders until it reaches the capacity of a DVD. Then I run my utility I've made and it searches in that root directory I specified for any and every file in any and every folder. Thats where I'm having the problem...

Application.FileSearch wont find any ZIP files for some reason???

What gives?
 
Application.FileSearch will not work with XP for finding .ZIP files, as XP treats these as compressed folders. I recommend using the FileSystemObject instead. I've attached an example.

When opening the file, a form opens with a listbox and a command button. Click on the command button. At the first prompt, enter the starting (root) folder. At the second prompt, enter the filename or pattern.
 

Attachments

Thanks for the example I'll check it out now.

The application I'm using is MS Access 2003 SP3 on 64bit Windows Vista Business SP1.
 
OMG! That example is SWEET!!!

It does exactly what I need. The only thing I need to do is add a few lines that write the values of files to a table and thats it...

THANK YOU!!!

bow.gif
 
Ok so I've been humbled quite a bit... The code in that example looks really simple but when I try to dissect it and make it it do what I want I'm lost... What exactly is happening in that example? I can follow it to a point but I'm struggling with understanding all the variables and why it works so well :confused:

HELP
 
Could you post the code that you would have used for the Application.FileSearch object? If so, I could help you adapt it accordingly.
 

Users who are viewing this thread

Back
Top Bottom