Cannot Find Files in Access with WIN XP - works with W2K

D

demclaughlin

I have been searching many messages boards and the like, but I am in a
corner. This is apparent only with ZIP files. I can list .txt files,
rtf files, etc. But Zip files do not work. This only happens in
Windows XP, not in W2K. I am assuming that I am running the same
versions of office XP/Access 2002.

Thanks!

-DEM

Here is the code that is not working:

'Loop through all of the Zip files in ATSW Reader directory and store
them in an array


Set fs = Application.Filesearch
With fs
.LookIn = "C:\atsw Reader"
.FileName = "*t*.zip"
If .Execute(SortBy:=msoSortByFileName, _
SortOrder:=msoSortOrderAscending) > 0 Then
'MsgBox "There were " & .FoundFiles.Count & _
" file(s) found."
For i = 1 To .FoundFiles.Count
'MsgBox .FoundFiles(I)
ZipArray(i) = .FoundFiles(i)
Next i
i = i - 1

Else
MsgBox "There were no files found."
End

End If
End With


-------------

I used this test from the MS website and it will give me a count of .txt
files, .rtf files, etc.

Sub TestSearch()
Dim fs As Object
Set fs = Application.Filesearch

With fs
NewSearch
LookIn = "C:\ATSW READER"
FileType = msoFileTypeAllFiles
FileName = "*t*.txt"
Execute
End With

MsgBox "files found=" & fs.FoundFiles.Count


End Sub

Thanks
 
S

stevecane

Hi DEM, I'm having exactly the same trouble. Did you have any luck? What
is it with zip files in XP. Are they classified as folders now?

Thanks in advance.

steve cane

(e-mail address removed)
 
R

rapwayne

I saw these posts and am having the same problem. Did you ever fix this
or come up with a good work around? Thx.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top