Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FileSearch.MatchTextExactly?!?

Status
Not open for further replies.

bujin

MIS
Oct 2, 2000
144
GB
I've got the following piece of code:

---

With Application.FileSearch
.NewSearch
.SearchSubFolders = True
.MatchTextExactly = True
.FileName = "data.mdb"
If .Execute() > 0 Then
For i = 1 To .FoundFiles.Count
AddListItem lstData, .FoundFiles(i)
Next i
End If
End With

---

Which is supposed to search through all of my drives for all of the files called "data.mdb" and then list them in the lstData listbox. It seems that leaving out the .LookIn property just means searching the current drive. That's not so much of a problem, I'm sure I can find my way around it. The problem is that even with the .MatchTextExactly property set to true, I still get files such as "DATA.MDB Design Docs.doc" etc...

How can I get it to only display the "data.mdb" file?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top