Solved

application.filesearch on XP doesn't like ZIP files

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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
bind Combobox 4 29
Access Runtime 2010 Error 17 30
Library not Registered 16 49
Restrict list data depending upon user name 3 20
Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

920 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now