what am I missing on filesearch

J

Jeff E

Hi - I am using the following code to find certain text
files in a specific path. I know that the file(s)
actually exist in the path I have specified, but
filesearch is not finding it. I have played around with
this and can get it to find .mdb files. This process is
being called from an access form.

With application.FileSearch
.NewSearch
.LookIn = "C:\Grant Files"
.FileType = msoFileTypeAllFiles
.SearchSubFolders = False (Have tried true)
.filename = "process*.*" (-- I have also done this
with *.* and can't get any hits either.)
.MatchTextExactly = False

If .Execute > 0 Then ' if1
totfiles = .FoundFiles.Count
More code follows this.
Else
Msgbox "No files found"
Endif
 

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