?
Solved

application.filesearch on XP doesn't like ZIP files

Posted on 2004-08-23
3
Medium Priority
?
340 Views
Last Modified: 2012-05-05
I have code that 'worked' as follows on a Windows 2000 machine.  I upgraded to Windows XP with SP2 and now it can't find any files.  I am looking for ZIP files.  When I change the extension to be anything ~other~ than ZIP then it can find files like crazy.  If I search for "*" (astersik) and the directory only contains zip files it says it found no files.  If I rename a ZIp file to a DIP file then it finds it.

Does anyone know how to make Windows XP return ZIP files to a filesearch?  (we also have WinZip 9.0 installed)

Here is my code:

    Set fs = Application.FileSearch
    With fs
        .LookIn = "G:\MyFiles\"
        .FileName = "*.zip"
        .SearchSubFolders = True
        If .Execute(msoSortByFileName, msoSortOrderDescending, True) > 0 Then
            MsgBox "There were " & .FoundFiles.count & " file(s) found."
        Else
            MsgBox "There were no files found."
        End If
    End With
0
Comment
Question by:HarrisRP
3 Comments
 
LVL 16

Accepted Solution

by:
PaulCaswell earned 2000 total points
ID: 11878787
The problem with XP is that it automatically expands .ZIP files on-demand as it were, i.e. without being asked.

I remember reading about this in another question:

http://www.experts-exchange.com/Operating_Systems/WinXP/Q_20309272.html

It suggests you install WinZip or mess with a DLL.

Paul
0
 
LVL 2

Expert Comment

by:Mavreich
ID: 11878926
Hi HarrisRP ,

I have also had this issue, except with me it also affected other applications as well.  If I wanted to attach a zip file to a mail message in Outlook 2003 it would see all files but zip files.  I was also running WInzip 9.0.  To resolve the issue I uninstalled Winzip 9.0.  Restarted the ws and then reinstalled Winzip 9.0.  Problelm solved.

Hope this helps.
Mavreich
0
 
LVL 1

Author Comment

by:HarrisRP
ID: 11881748
Winzip 9.0 was already installed.  Removed it and re-installed per Mavreich but still had problem.

Figured Paul's reson for the error was always the problem but now feel foolish for concentrating so much in the DB forum and not searching generally for that problem in XP.  The "regsvr32 /u zipfldr.dll" worked as recommended in the link.  The command basically removes XP's handling of ZIP files as folders and returns them back to being a file like we all know and love.
  Thanks Paul.

 - Richard
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
If you’re using QODBC to update QuickBooks data from Microsoft® Access but Access is not showing the updated data, you could have set up QODBC incorrectly.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question