Newsgroups : Borland : borland.public.delphi.rtl.win32 : 2006 Sep : Finding Files

www.cryer.info
Managed Newsgroup Archive

Finding Files

Subject:Finding Files
Posted by:"Jaeden "Sifo Dyas"al'Raec Ruiner" (jaedenruin..@wayoftheleaf.net)
Date:Sat, 2 Sep 2006 00:07:34

As a matter of curiosity, are there any stock file searching methodologies
that allow for recursive folder searching?

Naturally, I can do a FindFirst/next loop, searching for all Folders
(faDirectory) and recurse them manually, but that would be annoying.  I'm
wondering if this can be avoided, since there are many search handlers in
the ShellAPI that seem to recurse folders on their own.  However, when using
the search files and folders handler, I want to automate it, basically using
their code to do the work, while my application just provides the initial
search criteria.  Exemplia Gratia:

         SearchFile("myApp.exe", "C:\Program Files", 4)

Which would start in the program files directory, and try to find the file
"myapp.exe", but will only go 4 directories deep in the recursive search, or
something to that effect.

Thanks
Jaeden "Sifo Dyas" al'Raec Ruiner

Replies:

www.cryer.info
Managed Newsgroup Archive