Solved

application.filesearch on XP doesn't like ZIP files

Posted on 2004-08-23
3
332 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 500 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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

808 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