General Add Empty Folder context menu in Windows 11


  • Staff
Folder_delete_banner.png

You can add a Empty folder context menu to permanently delete the file contents of a folder after a one time Y/N confirmation to prevent emptying the folder by mistake.

Subfolders and their contents will not be deleted. Only the file contents in a folder you right clicked on will get permanently deleted.

This tutorial will show you how to add or remove the Empty folder context menu for folders for all users in Windows 10 and Windows 11.


While you must be signed in as an administrator to add or remove the context menu, all users can use the context menu.



EXAMPLE: Empty folder context menu

You will need to click/tap on Show more options first by default, then click/tap on Empty folder.



Show_more_options.png
Empty_folder_context_menu.png

Empty_folder_confirm_prompt.png



Here's How:

1 Do step 2 (add) or step 3 (remove) below for what you would like to do.

2 Add "Empty folder" Context Menu

A) Click/tap on the Download button below to download the file below, and go to step 4 below.​

Add_Empty_folder_context_menu.reg


(Contents of REG file for reference)
Code:
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\shell\EmptyFolder]
"Icon"="shell32.dll,-16715"
"MUIVerb"="Empty folder"
"Position"="bottom"

[HKEY_CLASSES_ROOT\Directory\shell\EmptyFolder\command]
@="cmd /c title Empty \"%1\" & (cmd /c echo. & echo This will permanently delete all contents in only this folder and not subfolders. & echo. & choice /c:yn /m \"Are you sure?\") & (if errorlevel 2 exit) & (cmd /c \"cd /d %1 && del /f /q *.*\")"

3 Remove "Empty folder" Context Menu

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_Empty_folder_context_menu.reg


(Contents of REG file for reference)
Code:
Windows Registry Editor Version 5.00

[-HKEY_CLASSES_ROOT\Directory\shell\EmptyFolder]

4 Save the .reg file to your desktop.

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

6 When prompted, click/tap on Run, Yes (UAC), Yes, and OK to approve the merge.

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


That's it,
Shawn Brink
 

Attachments

  • Folder_delete.png
    Folder_delete.png
    6.8 KB · Views: 10
  • Add_Empty_folder_context_menu.reg
    1.2 KB · Views: 48
  • Remove_Empty_folder_context_menu.reg
    494 bytes · Views: 47
Last edited:

Latest Support Threads

Top Bottom