How TO DELETE FOLDER contents by retaining Folder Structure in Windows XP

So here is a tutorial to delete the contents of a folder by retaining the folder structure. This option to ” Empty folder contents” can be added to the right click menu is so easy follow the steps below.

  1. Go to Start > Run > type regedit.
  2. Browse to HKEY_CLASSES_ROOT\Directory\shell.
  3. Right click on shell on the left pane and add a new key and name it as “Empty Folder Contents“.
  4. Now right click on Empty Folder Contents and create another key(subkey) to it and name it as Command.
  5. Click on Command and on the right pane you will see a key called default.
  6. Then double click on it and enter this value cmd /c “cd /d %1 && del /s /f /q *.*” .
  7. That’s it the job is completed.
  8. If you have any difficulty in doing it just download this file and run it.

From now onwards you will get the option Empty Folder Contents in Right click menu. So you can delete the folder contents safely and that too without removing folder tree structure.

Amal Roy is the Founder-Editor of Computing Unleashed. A Technology Enthusiast, Windows Adept and a Proud Geek!