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

  • Add_Delete_Empty_Folder_Context_Menus.reg
    1.3 KB · Views: 1,435
  • Remove_Delete_Empty_Folder_Context_Menus.reg
    638 bytes · Views: 1,102
  • Context_Menu.png
    Context_Menu.png
    3.5 KB · Views: 347
Last edited by a moderator:
Tutorial updated with a better Y/N confirmation option to better help avoid mistakes.
 

My Computer

System One

  • OS
    64-bit Windows 10
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Custom self built
    CPU
    Intel i7-8700K OC'd to 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G7 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    4TB Samsung 990 PRO PRO M.2,
    8TB WD MyCloudEX2Ultra NAS
    PSU
    OCZ Series Gold OCZZ1000M 1000W
    Case
    Thermaltake Core P3
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master 3
    Internet Speed
    1 Gb/s Download and 35 Mb/s Upload
    Browser
    Internet Explorer 11
    Antivirus
    Malwarebyte Anti-Malware Premium
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    APC SMART-UPS RT 1000 XL - SURT1000XLI,
    Galaxy S23 Plus phone
Thank you!

Could you please create non-confirmation versions :)
 

My Computer

System One

  • OS
    Windows 8.1
    Computer type
    PC/Desktop
    CPU
    i7 4790
    Motherboard
    Asus Z97-WS
    Memory
    32GB
    Browser
    Firefox
    Antivirus
    Norton
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.
 

My Computers

System One System Two

  • OS
    Windows 7 Home Premium
    Computer type
    PC/Desktop
    System Manufacturer/Model
    HP Pavillion
  • PC2
    Tablet - Windows 10 Home
That appears to work, thank you!
 

My Computer

System One

  • OS
    Windows 8.1
    Computer type
    PC/Desktop
    CPU
    i7 4790
    Motherboard
    Asus Z97-WS
    Memory
    32GB
    Browser
    Firefox
    Antivirus
    Norton
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.
 

My Computer

System One

  • OS
    windows 10
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.
 

My Computer

System One

  • OS
    64-bit Windows 10
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Custom self built
    CPU
    Intel i7-8700K OC'd to 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G7 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    4TB Samsung 990 PRO PRO M.2,
    8TB WD MyCloudEX2Ultra NAS
    PSU
    OCZ Series Gold OCZZ1000M 1000W
    Case
    Thermaltake Core P3
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master 3
    Internet Speed
    1 Gb/s Download and 35 Mb/s Upload
    Browser
    Internet Explorer 11
    Antivirus
    Malwarebyte Anti-Malware Premium
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    APC SMART-UPS RT 1000 XL - SURT1000XLI,
    Galaxy S23 Plus phone
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.
 

My Computer

System One

  • OS
    windows 10

My Computer

System One

  • OS
    64-bit Windows 10
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Custom self built
    CPU
    Intel i7-8700K OC'd to 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G7 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    4TB Samsung 990 PRO PRO M.2,
    8TB WD MyCloudEX2Ultra NAS
    PSU
    OCZ Series Gold OCZZ1000M 1000W
    Case
    Thermaltake Core P3
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master 3
    Internet Speed
    1 Gb/s Download and 35 Mb/s Upload
    Browser
    Internet Explorer 11
    Antivirus
    Malwarebyte Anti-Malware Premium
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    APC SMART-UPS RT 1000 XL - SURT1000XLI,
    Galaxy S23 Plus phone
Back
Top