That's not the problem, the file extensions (not directories) I submitted did exist.
I think the only way it will recurse is if you actually want to delete directories which are not empty. As it was, I wanted to delete specific file types in all the sub directories. I have now done the recursing myself and send an explicit list of all directories and the file types I wish to delete and it all works. Using this function has not saved me anything like as much effort as I had hoped. I thinnk the MS documentation is misleading as it specifically states "File deletion is recursive unless you set the FOF_NORECURSION flag in lpFileOp." Others may have a different view on this. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rob Kennedy Sent: 10 September 2007 14:58 To: Borland's Delphi Discussion List Subject: Re: Question on SHFileOperation John Barrat wrote: > D:\MyDir\*.AAA#0D:\MyDir\*.BBB#0D:\MyDir\*.CCC#0#0 > > SHFileOperation will operate on all occurences of files with extension > AAA,BBB and CCC in the D:\MyDir and all subdirectories to D:\MyDir > providing I haven't set the FOF_NORECURSION flag. > > In practice all that is happening when I do a FO_DELETE is that files > in the directory D:\MyFile are deleted with the extensions AAA, BBB or > CCC are deleted but no files having the same extension in the lower > directories are touched. My guess is that it's because you have no directories named x.aaa, for instance. Since it doesn't fit the patterns you've specified, it's ignored. -- 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

