0

I used what's below to delete a directory. It only deletes the directory if it's empty. How could I delete a directory and it's contents?

#include <unistd.h>

int main()
{
    rmdir("C:\\haha");
    return 0;
}
4
Contributors
7
Replies
8
Views
9 Years
Discussion Span
Last Post by Colin Mac
0

The command for deleting folder not empty is:

rmdir /S/Q directory.
The /S will delete directories not empty but asking for Y/N.
The /Q will not ask at all.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.