Re: Delete a directory and its contents
Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance
"Charles Tam" <CharlesTam@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:52251E04-4F35-4D3B-B24B-B9FA6B51CC37@xxxxxxxxxxxxxxxx
What is an efficient way to delete a directory and its contents?
Could I avoid iterating through all its contents and delete each one?
I think SHFileOperation with FO_DELETE will allow you to delete a folder and
it's contents all in one time. Just make sure you use double null
terminated strings (2 '\0' at the end) properly.
-- David
.
Relevant Pages
- Re: Intresting behavior
... Go read the doc on SHFileOperation and more specifically on SHFILEOPSTRUCT. ... There is even a flag to NOT move the folder with the files. ... If file connection is enabled, when you move or copy the HTML file, ... if you move the folder with the related files, the HTML file is also moved. ... (microsoft.public.windows.file_system) - Re: Intresting behavior
... > Go read the doc on SHFileOperation and more specifically on ... > There is even a flag to NOT move the folder with the files. ... and check out the fact that the word 'files' in the html ... If file connection is enabled, when you move or copy the HTML ... (microsoft.public.windows.file_system) - Re: Moving folders with SHFileOperation
... >> THe folders seam to copy alright, but windows cannot remove the source ... > hasn't yet finalized the copy operation and thus keeps the folder locked. ... Hello Tom, ... I am using shfileoperation with FO_MOVE. ... (comp.lang.pascal.delphi.misc) - Re: SHFileOperation return value
... > I am using API SHFileOperation to move some folders to Recycle Bin. ... Has your code opened the folder in question in any way (e.g. by using the ... to delete it in Explorer the folder is no longer in use. ... (microsoft.public.vb.general.discussion) - How to Create, Copy, Move and Delete folder in COM
... I'd like to add some file system functions to my COM dll running on ... Windows CE. ... I've tried SHFileOperation but got an "Unresolved external ... Is there any other way to create, copy, move or delete a folder? ... (microsoft.public.vc.atl) |
|