Folder - Delete Folder Content Context Menu

Add "Delete Files in Folder" and "Empty Folder" to Context Menu of Folders in Windows


information   Information
This tutorial will show you how to add or remove "Delete Files in Folder" and "Empty Folder" to the context menu of folders for all users in Vista, Windows 7, and Windows 8.

While you must be signed in as an administrator to add or remove the context menus, all users will be able to use it.

Note   Note
The context menus will only be able to delete what the user has access permission for in a folder.

Delete Files in Folder = This will instantly permanently delete only the files in the folder you right click on folder, and will not delete any subfolders or files in subfolders.

Empty Folder = This will instantly permanently delete everything (files, subfolders, files in subfolders) in the folder you right click on by deleting and recreating the folder you right click on.


When you click on either Delete Files in Folder or Empty Folder, a command prompt will open asking Are you sure? [Y/N] to confirm the action to help avoid deleting the contents of a folder by mistake.


EXAMPLE: "Delete Files in Folder" and "Empty Folder" context menus and confirmations
Empty_Folder_Context_Menu.png
Delete_Files_in_Folder_Confirmation.png
Empty_Folder_Confirmation.png





Here's How:

1. Do step 2 or 3 below for what you would like to do.

2. Add "Delete Files in Folder" and "Empty Folder" to Context Menu
A) Click/tap on the Download button below to download the file below, and go to step 4 below.​
Add_Delete_Empty_Folder_Context_Menus.reg
download

3. Remove "Delete Files in Folder" and "Empty Folder" from Context Menu
NOTE: This is the default setting.
A) Click/tap on the Download button below to download the file below, and go to step 4 below.​
Remove_Delete_Empty_Folder_Context_Menus.reg
download

4. Save the .reg file to your desktop.

5. Double click/tap on the downloaded .reg file to merge it.

6. If prompted, click/tap on Run, Yes (UAC-Windows 7/8) or Continue (UAC-Vista), Yes, and OK to approve the merge.

7. You can now delete the downloaded .reg file if you like.



That's it,
Shawn


 

Attachments

Last edited by a moderator:
Tutorial updated with a better Y/N confirmation option to better help avoid mistakes.
 
Thank you!

Could you please create non-confirmation versions :)

Run the 'Remove...' reg file, create a copy of the 'Add...' reg file, just in case; right click and choose Edit then remove:

& (cmd /c echo. & choice /c:yn /m "Are you sure?")

from the string, ONLY that!

Then re-merge the modified file.
 
it's a great context menu add-on. worked like a charm.
however, i'd ask if it would be possible to apply a similar reg addition to delete only the sub-folders keeping all other files intact within a folder ?
I tried to replace /a at the end of the delete files in folder line with /f , saving as a new .reg file named Add_Delete_Folders_only ,yet it didn't work at all.
thanks for any help.
 
Hello kvari, and welcome to Eight Forums. :)

If you like, you could remove the "/q" switch from the "Delete Files in Folder" command to have it prompt Y/N for each item. This way you could only delete the items you want in the folder.
 
thanks for your swift reply, Brink.
can we exclude files of specific extensions such as . txt, .cfg etc from this deletion scheme instead of a series of Y/N checks ? I actually use your wonderful reg without Y/N confirmation.
 
Back
Top