Thanks
SHFILEOPSTRUCT shfo = {0} ;
shfo.hwnd = GetDesktopWindow() ;
shfo.pFrom = szFolderToDelete ; // Terminate with 2 NULs
shfo.fFlags = FOF_SILENT | FOF_NOCONFIRMATION ;
shfo.wFunc = FO_DELETE ;
SHFileOperation (&shfo) ;
Richard.
http://www.rtrussell.co.uk/
To reply by email change 'news' to my forename.
Thanks for this. However, a further question - if there's a file open in
one of the subfolders, can the whole tree be removed? I tried this using a
file opened in notepad and it worked ok. However, if I have cmd open and
its pathed to one of the subfolders I get a permission denied.
I don't know for sure, but I suspect the answer is no. Notepad doesn't
really keep the file 'open' - it just loads it into memory - so that
explains why it worked OK.