Techniqued- Technoloy, Review and Tutorials
  • Android
  • Freewares
  • Tutorial
  • Windows 11
  • macOS
No Result
View All Result
Techniqued- Technoloy, Review and Tutorials
  • Android
  • Freewares
  • Tutorial
  • Windows 11
  • macOS
No Result
View All Result
Techniqued- Technoloy, Review and Tutorials
No Result
View All Result

Windows XP Tips: Delete Contents from Folder without Deleting Folders

Nirmal by Nirmal
February 8, 2008
in Tips and Tricks, Windows Tips
18
Share on FacebookShare on Twitter

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.

ShareTweetSendSend
Previous Post

Docx File Converter: 3+1 Ways to Convert and View Docx files

Next Post

Windows Live Writer: Save Drafts Automatically

Related Posts

Tips and Tricks

How to Enable Package Tracking in Gmail

January 30, 2023
Tips and Tricks

How to Create a Confidential Email on Gmail

January 25, 2023
Tips and Tricks

How to Bring back YouTube Dislike Count

January 24, 2023
Mobile Phones

Fix: OnePlus Verification Failed When Installing New Update

January 19, 2023
Photo Credit UnSplash
Apple iPhone

How to Use Two WhatsApp Accounts on an iPhone

January 15, 2023
Tips and Tricks

How to Find BitLocker Recovery Key

January 11, 2023

Comments 18

  1. Rakshit says:
    15 years ago

    Nice tip. Keep that coming.
    🙂

    Reply
  2. nirmaltv says:
    15 years ago

    @Rakshit,
    Sure! More tips on the way. 🙂

    Reply
  3. Syahid A. says:
    15 years ago

    Nice tip Nirmal. But you have to put the “warning” notes near the top before someone messed up their registry. :mrgreen:

    Reply
  4. Madhur Kapoor says:
    15 years ago

    Great tip buddy. Will save everybody a lot of time.

    Reply
  5. vekat says:
    15 years ago

    Nice tip Nirmal thanks

    Reply
  6. Jawwad says:
    15 years ago

    Very cool tip I have not heard about it before 😉

    Reply
  7. vekat says:
    15 years ago

    Nirmal, I’ve tried it on XP and its not working, Did anyone get this working.

    Reply
  8. nirmaltv says:
    15 years ago

    @Syahid,
    You are right, the warning should be at the top. I forgot that, thanks for that correction. 🙂

    @Venkat,
    I have tried this on Vista and it was working fine, please make sure that you have entered the value with the correct number of spaces.

    Reply
  9. Ashish Mohta says:
    15 years ago

    This is one good thing I was looking for after sendto option. Thanks nirmal, I will link you for sure in the next speed linking

    Reply
  10. nirmaltv says:
    15 years ago

    @Ashish,
    Glad that you liked the tip.

    Reply
  11. Martin says:
    15 years ago

    verkat,

    The following Key data works on WinXP SP2:

    cmd /c cd /d %1 && del /s /f /q *.*

    Reply
  12. Jonathan says:
    14 years ago

    Thanks Martin! I couldn’t get it to work!!

    Reply
  13. vinod says:
    14 years ago

    I brought a new pen drive and transferred all the data from my old pen drive by
    1. Making a folder called in the new one and then
    2. Copying everything from the old pen drive into it. (At that time, I needed to keep thee contents from my old drive separately for sorting purposes).

    Now, I want to delete the folder called without losing any of the data or folders inside it (in other words, I want all contents of the folder called to become part of the root directory of the new pen drive.

    I know that I can simply copy and paste, but just wanted to know whether there is a way to ‘promote’ folder contents?

    Thanx
    vinod

    Reply
  14. Alexander Char says:
    14 years ago

    Sorry, but it is showing this error message
    ” This file does not have a program associated with it for performing this action. Create an association in the Folder Options control panel”

    i want to learn such things more pls help

    Reply
  15. Pranab says:
    14 years ago

    Hello Vinod even i want to achieve that

    Reply
  16. Alex says:
    12 years ago

    Is there a way of restoring the deleted content back?

    Reply
  17. Madhu says:
    11 years ago

    Niramal, how to enable a warning prompt message before the contents get deleted?

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.



Latest Articles

How to Check Your Data Usage on Android and iPhone

How to Move or Copy Email From One Gmail Account to Another

How to Password Protect Folders in Windows 11

How to Enable Reading Mode on Android

How to Enable Firewall on macOS Ventura

How to Reset Graphics Driver on Windows 11

Techniqued- Technoloy, Review and Tutorials

© 2021 Techniqued - Technology, Tips, Tricks and Reviews

Navigate Site

  • About Us
  • Advertise with us
  • Contact Us
  • Copyright Policy
  • Disclaimer

Follow Us

No Result
View All Result
  • Android
  • Freewares
  • Tutorial
  • Windows 11
  • macOS

© 2021 Techniqued - Technology, Tips, Tricks and Reviews

This website uses cookies. By continuing to use this website you are giving consent to cookies being used. Visit our Privacy and Cookie Policy.