Force Delete Folder in CMD in Windows
The rmdir CMD command is used to delete folders on the Windows operating system. But you must use the /s
option to force delete the folder if it is not empty.
rmdir /s Folder-Name
Without /s
, the folder must be empty. You can also add the /q
option to force delete a folder without being prompted for confirmation.
rmdir /s /q Folder-Name
When you force delete a folder in CMD, the files are deleted immediately and are not moved into the Recycle Bin.