473,473 Members | 1,816 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

FileSearch

Can anyone please tell me why the following code works fine in
Win98/Access97, but fails to recognize files with a ".zip" extension in
WinXP/Access2002/2000? It correctly lists the name of each ".txt" file in
the folder.

....................
With Application.FileSearch
..FileName = "*.*"
..LookIn = "C:\_PriorAuth"
..SearchSubFolders = False
..Execute
For Each varItem In .FoundFiles
Debug.Print varItem
Next varItem
End With
......................

Thank you,
Mark
Nov 13 '05 #1
1 2550
I'm not really sure how FileSearch works, because it's part of the Office
libary which doesn't work in the runtime anyway, but if it relies on the
Windows search, that was mutilated in Win 2000/XP so that it only handles
registered file extensions.

If that is the cause of the problem, you can address the issue like this:
1. At Start | Run, enter CIADV.MSC, and click Ok to start the Indexing
Service.

2. Check the box under:
Action | Properties | Generation | Index files with unknown extensions.

(Note that you do not have to turn the indexing service on.)

Dunno if that will solve your issue, Mark. Let us know how you go.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Mark" <cm*@mountain.net> wrote in message
news:60**************************@posting.google.c om...
Can anyone please tell me why the following code works fine in
Win98/Access97, but fails to recognize files with a ".zip" extension in
WinXP/Access2002/2000? It correctly lists the name of each ".txt" file in
the folder.

...................
With Application.FileSearch
.FileName = "*.*"
.LookIn = "C:\_PriorAuth"
.SearchSubFolders = False
.Execute
For Each varItem In .FoundFiles
Debug.Print varItem
Next varItem
End With
.....................

Thank you,
Mark

Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: andybriggs | last post by:
Hi all, Two machines out of eight that are running an A97 database stored on a server are generating an "Invalid Procedure Call or Argument" error when encountering the .Filename property of...
3
by: Wilson Tan | last post by:
Has anybody encountered any problem with the Execute method or FilesFound property of the FileSearch object in Access 2002? I have this short routine that searches for a specific file that I'm...
1
by: | last post by:
Hi I am using Filesearch to find a list of files in a directory, and then to take the data and put it into an Access database. The code was working well within VBA and I have ported it into VB6,...
7
by: Brent McIntyre | last post by:
Good evening all, I am writing a program which requires me to search for files as I have done many times in Microsoft Excel Visual Basic for Applications, as per below. Set fs =...
19
by: Alan Carpenter | last post by:
Access 8 on Win98 and WinXP I'm having trouble with wildcards in the .Filename property of the FileSearch Object giving different results on win98 and XP. I've been successfully using...
2
by: stuart.medlin | last post by:
I have recently converted an Access 97 database to Access 2003. However, I am running into a problem with using Application.Filesearch to locate a file in my directory. The code follows: ...
5
Lokean
by: Lokean | last post by:
At the top of my module I have Imports Microsoft.Office.Core Imports VBA Public Function rpu_process_files(Optional ByVal sFolderString As String = "", _ Optional ByVal sSearchString...
22
tdw
by: tdw | last post by:
We just added a new login name in our server for a girl named Courtney. She is using a computer that I used to use. The following code in our Orders Database has alway worked fine, but when she is...
3
by: MLH | last post by:
With Application.FileSearch .NewSearch .LookIn = "C:\My Documents" .SearchSubFolders = True .FileName = "Run" .MatchTextExactly = True .FileType = msoFileTypeAllFiles End With My code pukes...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.