How To: Add Delete Folder Contents Option To Windows 7/Vista Right Click Context Menu
With a simple windows registry tweak you can add the option Delete Folder Contents to the right-click context menu which appears when you right-click a folder in Windows 7 or in Windows Vista.This would come handy at times when you want to delete all the files inside a folder and all it’s sub-folders without deleting the folders themselves.
Method 1:
- Click on Windows 7/Vista Start button, type regedit in the start menu search box and hit enter.
- Navigate to the following registry key:
HKEY_CLASSES_ROOT\Directory\shell
- Right click on shell folder, and then choose New -> Key. Name the new subkey as Delete Folder Contents, or anything you would like.
- Right click on Empty Folder Contents and choose New -> Key. Name the sub-key as Command.
- Under the Command sub-key, double click on the Default value data that is located at right pane.
- On the pop-up “Edit String” dialog window, enter the following value:
- cmd /c “cd /d %1 && del /s /q *.* in the value data field and hit OK
- Close Registry Editor and your done.
Method 2:
Open a new file in Windows 7/ Windows Vista Notepad editor and paste thje code of this registry hack and then save the file with a .reg extension, and then double-click the saved file to enter the information into the Windows 7/ Windows Vista registry.
Windows Registry Editor Version 5.00[HKEY_CLASSES_ROOT\Directory\shell\Delete Folder Contents]
[HKEY_CLASSES_ROOT\Directory\shell\Delete Folder Contents\command]
@=”cmd /c \”cd /d %1 && del /s /q *.*”
Once you’ve completed these steps, the new item will be available on the context menu and no need to reboot.
Alternate Method:
Download, extract, and double-click on Empty-folder-contents.reg to merge the registry values into the Windows registry and thus you can add the option Delete Folder Contents to the right-click context menu in Windows 7 or in Vista.
Add Delete Folder Contents to Right Click Context Menu
Warning: Modifying the Windows registry can cause serious damage to your Windows Operating System.It is better to backup your Windows registry data before making any changes. Tomstricks.com is not responsible for any changes you may make to your system.
Popularity: 6%
Did You Like This Post? Then You Might Find These Also Interesting:
Written by Tony on February 21st, 2009 with
no comments.
Read more articles on Vista How To? and W7 Features and W7 Tweaks.





