Windows – What’s the equivalent to ‘rm -rf’ with Windows command

windows 7

I need to delete a whole directory (with a lot of sub directories and files) by running a command in a batch file.

I tried delete and erase, but both of them requires me to answer 'Y/N', and it doesn't seem to delete the directories if one has subdirectories or files.

What command can I use to delete a directory with subdirectories/files without whatever prompt?

Best Answer

rmdir /s /q [directory]
Related Question