There may be many cases where you want to delete all the contents inside the folder, but wanted to maintain the folder structure as usual. By default Windows does not provide this option. If there are lots of folders inside a particular folder, then its difficult to delete contents from all the folders. This task can be done by following..

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 *.*.

Once you close the registry, a 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 same.

Note: Backup ur registry before performing this..


Post a Comment

Add this topic to :