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
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