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

Search Through Subdirectories

Status
Not open for further replies.

kezzab

Programmer
Nov 9, 2005
14
GB
Hi,

Does anyone have any ideas on how I can search through a number (hundreds) of sub directories on a file system looing for a particulary ini file in each directory and if it is found then return the directory it is in?

I have had a look using the FSO objects but cannot get it to work.

Thanks in advance

 
See "Dir Function" in the VBA help file

________________________________________________________
Zameer Abdulla
Help to find Missing people
Even a thief takes ten years to learn his trade.
 
Two thoughts:[ol][li]This is a classic recursive function which can be solved using [tt]Dir()[/tt]. I would give you a code snipit but recursion gives me a headache.[/li][li]Try looking at the [tt]FileSearch[/tt] class of the Office Library (specifically the [tt]FoundFiles[/tt] object) in the Help files.[/li][/ol]

Hope this helps,
CMP

Funny thing about being unemployed, weekends don't mean quite so much, just means you get to hang out with your working friends. Primus
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top