How to remove a directory
-
How to remove a directory and it's sub directory/files? Api RemoveDirectory only operates on empty directories.
You need to write a recursive function to walk down the folder tree and start deleting things from the bottom up. For a given directory enumerate the contents, for each sub directory call your directory delete function again and then delete the directory when it returns
-
How to remove a directory and it's sub directory/files? Api RemoveDirectory only operates on empty directories.
You could try experimenting with SHFileOperation() setting the wFunc member to FO_DELETE and NOT including FOF_NORECURSION in the fFlags member. I have used it to delete all files in a folder in one operation but havent actually tried the recursive delete that is implied by the FOF_NORECURSION flag.
-
How to remove a directory and it's sub directory/files? Api RemoveDirectory only operates on empty directories.
Or see
_rmdir
. -
How to remove a directory and it's sub directory/files? Api RemoveDirectory only operates on empty directories.
http://www.codeproject.com/shell/cshellfileop.asp\[[^](http://www.codeproject.com/shell/cshellfileop.asp "New Window")]
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
Never mind - my own stupidity is the source of every "problem" - Mixturecheers, Alok Gupta VC Forum Q&A :- I/IV Support CRY- Child Relief and You
-
Or see
_rmdir
.Please Note: _rmdir The directory must be empty, and it must not be the current working directory or the root directory.