Vista tip: Delete the Contents of a Folder Without Even Opening It
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
3. Right-click on shell, choose New, Key, and name it Delete Folder Contents.
4. Right-click on the new Delete Folder Contents key, choose New, Key, and name it command.
5. In the right pane, double-click on the Default string value, and then copy/paste this text: cmd /c "cd /d %1 && del /s /q *.*
6. Click OK, exit the Registry, and you're good to go.
Now you can right-click on any folder (without actually opening it first) and you should see the new Delete Folder Contents option.
PC World
Sign up for ITworld's Daily newsletter
Follow ITworld on Twitter @IT_world
On Twitter now
vista
Powered by Twitter
Esther Schindler
If the comments are ugly, the code is ugly
claird
SVG a graphics format for 21st century
pasmith
Take Chrome OS for a test spin
Sandra Henry-Stocker
Solaris Tip: Have Your Files Changed Since Installation?
jfruh
Android fragments vs. the iPhone monolith
mikelgan
What Gizmodo missed about the Pro WX Wireless USB disk drive
Sidekick: The Good News & the Bad News
Either way you look at it Microsoft Data Center management did not follow standards or best practices in this failure. In which case it makes me wonder more about the outsourcing of corporate data much less personal data.
- mburton325
Join the conversation here
Quick, practical advice for IT pros. Made fresh daily.
Want to cash in on your IT savvy? Send your tip to tips@itworld.com. If we post it, we'll send you a $25 Amazon e-gift card.













