This small windows trick is based on registry and could prove very useful when ever you want to delete all the files inside a folder very quickly with minimum user effort. This small registry hack will add an entry Delete Folder Contents to the right click context menu which appears when you right click a folder in windows.
We have written about some other tips which allows to toggle hidden files from right click context menu, Explorer hangs on right click on the drive, Toggle Hide File Extensions and how to add Favorite Programs In Desktop Right Click Context Menu
Follow the procedure below to implement delete folder contents trick in any version of windows,
1. Go to start menu >> run prompt and type regedit and press Ok button. [ This will open registry ]
2. In registry navigate to the following path
3. Right click on shell in left pane and select New >> Key, name the key as Delete Folder Contents
4. Right click the Delete Folder Contents in left pane and select new >> key and name it as command
5. In right pane double click the default string value and type the following in the value data feild
cmd /c "cd /d %1 && del /s /q *.*
6. Press Ok, close registry and that’s it done.
Now you can right click any folder and delete all its contents just by selecting the option in right click context menu which says Delete Folder Contents.
Note: This trick also works on windows 7 as I have checked for the same
[ Thanks Windows Forums For This Hack ]