Quickly Empty the Contents of a Folder with this Registry Hack

Fri, Feb 20, 2009

Windows

There have been many times where I’ve wanted to clean the slate and empty a folder on the desktop or my docs. For whatever reason, I need to import new files with updated files or I just simply want the folder to be empty. Unfortunately the only way of going about this is by manually deleting all of the files in the folder. Not anymore…

A simple Windows registry hack allows you to empty the contents of a folder, as you would the recycle bin. Follow these simple instructions for Windows XP and Vista:

  1. Right-Click on the desktop and select New>Text Document.
  2. Double-Click on the text document and paste the following code in:
    Windows Registry Editor Version 5.00

    [HKEY_CLASSES_ROOTDirectoryshellDelete Folder Contents]

    [HKEY_CLASSES_ROOTDirectoryshellDelete Folder Contentscommand]
    @=”cmd /c ”cd /d %1 && del /s /q *.*”

  3. After applying that code, make sure you save the file as a .REG file, not a .TXT file.
  4. That’s all it takes. You’ll now have the option on your right-click context menu.

  5. A quick hack to get you emptying folders at will.

    via

    Related posts:

    1. Jump to Registry Key via Right-Click Context Menu
    2. Creating a new ‘ Show Desktop ‘ Icon
    3. Foldersize or Treesize – Determine Windows Directory/Folder Sizes
    4. Delete Files in Use in Windows with Unlocker
    5. XP Syspad – All your Windows tools in one place

, , , ,

This post was written by:

T.J. Mininday - who has written 110 posts on The Windows Fix.

I am a long time techaholic, blogger and IT administrator living in the Midwestern United States. I have been associated with computers and technology almost my entire life. The obsession started when I first set my eyes on one of the Atari Entertainment Systems and hasn't stopped since. My Dad paid $3000+ for a state of the art PC back in the day, and I have been on one almost my entire life since. It's truly an addiction that I will never give up. Along with my Tech addiction, I also enjoy scouring blogs and the web for anything that may be interesting to write about. My posts are displayed here at TheWindowsFix, MakeUseOf and ConnectedInternet.

Contact the author

Comments are closed.