Delete the Contents of a Folder Without Even Opening It

28.04.2009
Monday you learned how to turn a folder into a "favorite" for quick and easy access. Okay, but what if you want a quick and easy way to clear out a folder while leaving the folder itself intact?

Sure, you can open the folder, tap Ctrl-A to "select all" files, and then hit the Delete key. But for fans of right-click context menus (you know who you are), there's another way. By making a simple change to the Windows Registry, you can add a function called Delete Folder Contents. It's great for those times when you want to empty a folder without trashing the folder itself--and without even opening it first.

One word of caution: Any time you monkey with the Registry, there's a risk of messing up Windows. It's a tiny risk, and I've performed this hack myself with no problems to report, but I just wanted you to be aware.

Here's the process:

1. Click Start, type regedit in the search box, and then hit Enter.

2. In Regedit, go to HKEY_CLASSES_ROOT\Directory\shell