- "Start" -> Run -> cmd
- cd to the directory. In this example I want to delete 'virtual' and
all subfiles & folders
cd ../virtual
- Run this command inside the directory:
del /f/q/s *.* > nul
- Run this sequence to cd to the parent directory and delete all the folders inside of your folder (again my example is a folder called virtual):
cd ..
rmdir /q/s virtual
- Put this in a file called quick_delete.bat:
@ECHO OFF
ECHO Delete Folder: %CD%?
PAUSE
SET FOLDER=%CD%
CD /
DEL /F/Q/S "%FOLDER%" > NUL
RMDIR /Q/S "%FOLDER%"
EXIT
- Move this file after saving to
C:\Windows
- In regedit go to
HKEY_CLASSES_ROOT\Directory\shell\
- Create a new key called Quick Delete
- Under that create another new key called command
- Click command then in the right pane double-click (Default) and
set the "Data" to:
cmd /c "cd %1 && quick_delete.bat"
- Now you can right click a directory and delete it fast!