Solved

application.filesearch on XP doesn't like ZIP files

Posted on 2004-08-23
3
328 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
Comment Utility
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
Comment Utility
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
Comment Utility
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 run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
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…
Familiarize people with the process of utilizing SQL Server functions 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 Ac…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

743 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

17 Experts available now in Live!

Get 1:1 Help Now