Solved

application.filesearch on XP doesn't like ZIP files

Posted on 2004-08-23
3
334 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

690 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