I was aware that SHFileOperation supported subdirectory recursion, however
for my application I want to produce a check list of file types where the
user can select which file type to delete.  SHFileOperation using its wild
cards can then delete them.

At present I am building this list myself using FileFind and FindNext. I
don't seem to have the JCLFileUtils unit in my installation but as I have a
reasonable working solution now I don't think it is worth pursuing further
at this point.

Thanks again for the help.

JohnB

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Rob Kennedy
Sent: 06 September 2007 18:41
To: Borland's Delphi Discussion List
Subject: RE: Closing modal forms

John Barrat wrote:
> Have used SHFileOperation to do the deletin and record the progress - 
> works great - thanks for the help.
>
> Now for a follow on question.
>
> Currently I am using the FindFirst/FindNext functions to obtain a list 
> of files in a directory an have written additional code to recurse 
> through any the subdirectories.  Is there a function (similar the the 
> SHFileOperation) which will do this already?

ShFileOperation understands wildcards. It can also delete entire directory
hierarchies (as opposed to RemoveDirectory, which requires directories to be
empty). So you shouldn't need to build up a list of all the files you want
to delete.

Anyway, Delphi has nothing built in. The JCL has some file-enumeration
tools, though. Look in the JclFileUtils unit.

--
Rob


_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi


_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to