How To Delete/Empty The Contents Of Any Folder Easily

Posted on June 4, 2009 by Mida



Have you ever wanted to delete the contents of particular folder and just leave the folder empty?. you can just delete the whole folder and Re-Create empty folder but this just waste of time you can create new command and add it to contest menu item.

A small registry edit can do this job for you. Preferably, you should define a context command so that you find the process easy. This will create a context menu item which lets you delete contents of folders without affecting the folder structure.

To add the context menu item,

  1. Open the registry Editor ‘Start > Run’ and type ‘regedit’. 
  2. In the registry, navigate to the ‘HKEY_ CLASSES_ROOT\Directory\shell’ .
  3. Right click on ‘shell’ and create ‘New > Key’‘ with the value “Empty Folder Contents”
  4. Then create the ‘command’ sub key in the same way.
  5. Select the “command” key you just created then on the right side open ‘Default’ by right-clicking on it and choose Modify and fill it with the following:

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

     6-2-2009 10-10-04 AM

The new command ‘Empty folder contents’ will be displayed in the context menu for folders immediately after you close the registry Editor.

6-2-2009 10-05-19 AM

Now whenever you need to empty  the contents of any folder, just right click on the folder and choose ‘Empty Folder Contents’ from the context menu .

Related posts:

  1. Auto Delete Empty Folders With No Files Data
  2. How To Quickly Navigate to System Folders in Vista Using Shell Folders
  3. How To Hide And Secure Any Folder
  4. How To open a Command Prompt From Any Folder With Right-Click In Windows Vista
  5. How To Add Internet Explorer Icon to the Desktop in Vista

Filed Under: Misc

Comments are closed.