• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Folder - Delete Folder Content Context Menu


Brink

Administrator
Administrator
mvp
Posts
22,825
Folder - Delete Folder Content Context Menu
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.
Published by Brink
#1
ByLine
Add Delete Files in Folder and Empty Folder to Context Menu of Folders in Windows
Synopsis
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.
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


 
Last edited by a moderator:

My Computer

System One

  • OS
    64-bit Windows 10
    Computer type
    PC/Desktop
    System Manufacturer/Model Number
    Custom self built
    CPU
    Intel i7-3930K 3.2 Ghz (O/C to 4 Ghz)
    Motherboard
    ASRock X79 Extreme11
    Memory
    32 GB (8GBx4) G.SKILL DDR3 Quad PC3-19200 2400 MHz
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
    Sound Card
    SB Recon 3Di Integrated Chip
    Monitor(s) Displays
    3 x 27" Asus VE278Q
    Screen Resolution
    1920x1080
    Hard Drives
    256GB OCZ Vector
    6TB WD Black WD6001FZWX
    PSU
    OCZ Series Gold OCZZ1000M 1000W
    Case
    Corsair Air 740
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master
    Internet Speed
    100 Mb/s Download and 10 Mb/s Upload
    Browser
    Internet Explorer 11
    Antivirus
    Malwarebyte Anti-Malware Premium
    Other Info
    Lite-On iHBS212 12x BD Writer
    Creative F200 webcam
    Samsung CLX-3175FW Printer
    Linksys EA9500 Router
    Arris SB6190 Cable Modem
    APC SMART-UPS RT 1000 XL

Brink

Administrator
Administrator
mvp
Posts
22,825
#2
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 Number
    Custom self built
    CPU
    Intel i7-3930K 3.2 Ghz (O/C to 4 Ghz)
    Motherboard
    ASRock X79 Extreme11
    Memory
    32 GB (8GBx4) G.SKILL DDR3 Quad PC3-19200 2400 MHz
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
    Sound Card
    SB Recon 3Di Integrated Chip
    Monitor(s) Displays
    3 x 27" Asus VE278Q
    Screen Resolution
    1920x1080
    Hard Drives
    256GB OCZ Vector
    6TB WD Black WD6001FZWX
    PSU
    OCZ Series Gold OCZZ1000M 1000W
    Case
    Corsair Air 740
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master
    Internet Speed
    100 Mb/s Download and 10 Mb/s Upload
    Browser
    Internet Explorer 11
    Antivirus
    Malwarebyte Anti-Malware Premium
    Other Info
    Lite-On iHBS212 12x BD Writer
    Creative F200 webcam
    Samsung CLX-3175FW Printer
    Linksys EA9500 Router
    Arris SB6190 Cable Modem
    APC SMART-UPS RT 1000 XL
Posts
2
#3
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

Edwin

Well-Known Member
VIP Member
Guru
Posts
1,759
#4
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 Number
    HP Pavillion
  • PC2
    Tablet - Windows 10 Home

kvari

New Member
Posts
2
#6
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

Brink

Administrator
Administrator
mvp
Posts
22,825
#7
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 Number
    Custom self built
    CPU
    Intel i7-3930K 3.2 Ghz (O/C to 4 Ghz)
    Motherboard
    ASRock X79 Extreme11
    Memory
    32 GB (8GBx4) G.SKILL DDR3 Quad PC3-19200 2400 MHz
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
    Sound Card
    SB Recon 3Di Integrated Chip
    Monitor(s) Displays
    3 x 27" Asus VE278Q
    Screen Resolution
    1920x1080
    Hard Drives
    256GB OCZ Vector
    6TB WD Black WD6001FZWX
    PSU
    OCZ Series Gold OCZZ1000M 1000W
    Case
    Corsair Air 740
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master
    Internet Speed
    100 Mb/s Download and 10 Mb/s Upload
    Browser
    Internet Explorer 11
    Antivirus
    Malwarebyte Anti-Malware Premium
    Other Info
    Lite-On iHBS212 12x BD Writer
    Creative F200 webcam
    Samsung CLX-3175FW Printer
    Linksys EA9500 Router
    Arris SB6190 Cable Modem
    APC SMART-UPS RT 1000 XL

kvari

New Member
Posts
2
#8
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

Brink

Administrator
Administrator
mvp
Posts
22,825
#9

My Computer

System One

  • OS
    64-bit Windows 10
    Computer type
    PC/Desktop
    System Manufacturer/Model Number
    Custom self built
    CPU
    Intel i7-3930K 3.2 Ghz (O/C to 4 Ghz)
    Motherboard
    ASRock X79 Extreme11
    Memory
    32 GB (8GBx4) G.SKILL DDR3 Quad PC3-19200 2400 MHz
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
    Sound Card
    SB Recon 3Di Integrated Chip
    Monitor(s) Displays
    3 x 27" Asus VE278Q
    Screen Resolution
    1920x1080
    Hard Drives
    256GB OCZ Vector
    6TB WD Black WD6001FZWX
    PSU
    OCZ Series Gold OCZZ1000M 1000W
    Case
    Corsair Air 740
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master
    Internet Speed
    100 Mb/s Download and 10 Mb/s Upload
    Browser
    Internet Explorer 11
    Antivirus
    Malwarebyte Anti-Malware Premium
    Other Info
    Lite-On iHBS212 12x BD Writer
    Creative F200 webcam
    Samsung CLX-3175FW Printer
    Linksys EA9500 Router
    Arris SB6190 Cable Modem
    APC SMART-UPS RT 1000 XL