Delete Files

I have a folder, in which I don't know, how many subfolders and file reside. I just have to delete whatever is there within that folder.

Now if I programmatically find each and every contents and delete it step by step, does'nt seems to be a good idea.

Is there any short function which MFC provides to delete whatever is present within a folder in one go??

PS: Sorry I accidentally posted it here. I should have posted it in VC++/MFC Section. I don't know how to delete a thread
[522 byte] By [maverick786us] at [2007-11-20 8:35:05]
# 1 Re: Delete Files
I have a folder, in which I don't know, how many subfolders and file reside. I just have to delete whatever is there within that folder.

Now if I programmatically find each and every contents and delete it step by step, does'nt seems to be a good idea.

Is there any short function which MFC provides to delete whatever is present within a folder in one go??
maverick786us at 2007-11-11 3:49:38 >
# 2 Re: Delete Files
Use SHFileOperation ( http://msdn2.microsoft.com/en-us/library/ms647743.aspx).
SuperKoko at 2007-11-11 3:50:38 >
# 3 Re: Delete Files
DeleteFile or DeleteFolder
sunny_sz at 2007-11-11 3:51:45 >
# 4 Re: Delete Files
I have a folder, in which I don't know, how many subfolders and file reside

Try CFileFind

Hope it helps.
sunny_sz at 2007-11-11 3:52:39 >
# 5 Re: Delete Files
Use ::SHFileOperation() ( http://msdn2.microsoft.com/en-us/library/ms647743.aspx) with FO_DELETE. ;)

Cheers
golanshahar at 2007-11-11 3:53:49 >
# 6 Re: Delete Files
Now if I programmatically find each and every contents and delete it step by step, does'nt seems to be a good idea.Really? As for me, it's a very good idea. Especially in case you want to control any situation and provide detailed problem diagnostics to end user.

Is there any short function which MFC provides to delete whatever is present within a folder in one go??One more blind MFC worshipper... ;)
Igor Vartanov at 2007-11-11 3:54:46 >
# 7 Re: Delete Files
[ merged ]

Regards,
Siddhartha
Siddhartha at 2007-11-11 3:55:50 >