How to remove a directory along with its contents in C++11? I thought rmdir() removes directory along with its contents but it removes only empty directories.
Is there any function in C++11?
you can do it with commands.
del /s deletes all the files under the path. (you don't need this -- it leaves the folder structure).
rmdir /s /q deletes all the folders after that. (this zaps the files too).
winapi is better than os system calls if its a windows program. If its a console program for your own use, system is fine. If you just want this and nothing else, a batch file is fine or type in console (batch just lets you double click without opening a console for things you do frequently).