Results 1 to 3 of 3

Thread: How to Add “Empty Folder Contents” To Vista Right Click Context Menu To Delete Files Without Removing Folders

  1. #1
    Join Date
    Aug 2006
    Posts
    168

    How to Add “Empty Folder Contents” To Vista Right Click Context Menu To Delete Files Without Removing Folders

    There may be need for Windows user to quickly delete and empty all files content inside a myriad hierarchy of folders, but maintaining and preserving the structure of the folders tree. In other words, user wants to just delete and remove the files, but not the folders that storing the files. There is a trick to add “Empty Folder Contents” contextual item into right click context menu (much like how user access the “Delete” function) in Windows XP, which works on Windows Vista, also Windows Server 2003 and 2008 as well.

    To enable the “Empty Folder Contents” right click context menu command, just follow these steps:


    • Run Registry Editor (regedit).
    • 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 Empty 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 /f /q *.*"


    • Click OK button to save the setting, and exit from Registry Editor.


    For user who doesn’t want to manually edit and mess with the system registry, download empty-folder-contents.zip and apply to merge the empty-folder-contents.reg values to registry.

    Now, just right click on the folder and select Empty Folder Contents to delete all its file contents recursively into all sub-directories, but the the sub-folders will not be touched and preserved.

    Source: mydigitallife.info

  2. #2
    Join Date
    Apr 2008
    Posts
    395
    Thanks man Very cool tip I have tried this on Vista and it was working fine.

  3. #3
    Join Date
    Apr 2008
    Posts
    598
    The following Key data works on WinXP SP2:

    cmd /c cd /d %1 && del /s /f /q *.*

Similar Threads

  1. How to add system folders to context menu in windows 7
    By Arnabi in forum Customize Desktop
    Replies: 7
    Last Post: 22-03-2012, 09:21 AM
  2. Removing context menu entries from the Windows 7 x64
    By Man-Than in forum Windows x64 Edition
    Replies: 3
    Last Post: 13-05-2011, 11:54 AM
  3. How to Make Context Menu Appear on Mouse Click
    By NSA_CIA in forum Tips & Tweaks
    Replies: 3
    Last Post: 03-10-2009, 11:56 AM
  4. Add "Delete Folder Contents" To Windows 7 Right Click
    By Deep123 in forum Customize Desktop
    Replies: 3
    Last Post: 10-04-2009, 08:17 AM
  5. Right click context menu - Change
    By Derek in forum Windows XP Support
    Replies: 2
    Last Post: 16-10-2008, 10:11 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,440,442.71817 seconds with 17 queries