Windows XP Tips: Delete Contents from Folder without Deleting Folders

Advertisements

There may be many instances where you would want to delete all the contents inside the folder, but wanted to maintain the folder structure as such. By default Windows does not provide any such option. If there are lots of folders inside a particular folder maintaining a folder structure, then its difficult to delete contents from all the folders. This task can be done using a registry entry.

To do this go to Start-> Run and type ‘regedit‘. In the registry, navigate to HKEY_CLASSES_ROOT\Directory\Shell key. Right click on ‘Shell’ and then create the ‘Empty folder Contents‘ sub key with the New|Key. then create the command key in the same way. Open ‘Default‘ by right clicking on it in the right hand side window. and fill it with the following entry- ‘cmd /c “cd /d %1 && del /s /f /q *.*.

registry.jpg

registry11.jpg

Once you close the registry, the new command will appear in the right click menu of the folder. Now whenever you want to delete the contents, select “Empty Folder Contents” and only the contents will be deleted, the folder structure will remain intact.

NB: Please back up your registry before making any changes.

 

Share this Post

stumbleupon-48�48.png digg-48�48.png technorati-48�48.png feeds-48�48.png delicious-48�48.png

 

Comments


Add a comment

Translate Page

Translate to EnglishÜbersetzen Sie zum Deutsch/GermanПереведите к русскому/RussianΜεταφράστε στα ελληνικά/GreekVertaal aan het Nederlands/Dutchترجمة الى العربية/Arabic中文翻译/Chinese Traditional
中文翻译/Chinese Simplified한국어에게 번역하십시오/Korean日本語に翻訳しなさい /JapaneseTraduza ao Português/PortugueseTraduca ad Italiano/ItalianTraduisez au Français/FrenchTraduzca al Español/Spanish
Nirmal is a Software Engineer and Technology Blogger. He is a Microsoft Most Valuable Professional in Windows Desktop Experience.
mvp   India Technology Bloggers  

More Articles

Sony Ericsson Phone releases and reviews
Top Tutorials
Freeware for Windows XP/Vista
Personal Blog