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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Searching For Multiple Files using VB

Status
Not open for further replies.

rossmcl

Programmer
Apr 18, 2000
128
0
0
Hi

I want to search for certain files on a mail exchange using VB. ie so I can pull up ALL pst's that contain word *smith or whatever - I dont want to just find the first one - and stick their full names in a list.

Anyone got the code for this?

Thanks
 
MyPath = "c:\exchange\*smith*.pst"
MyName = Dir(MyPath)
Do While MyName <> &quot;&quot; ' Start the loop.
Debug.Print MyName ' Add to your list here
MyName = Dir ' Get next entry.
Loop

Hope this helps,

Rob.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top