Delete Files by Using “Empty Folder Contents” In Windows Vista
By preserving and maintaining folders tree structure, the user can quickly remove and empty the entire files contents within a countless order of folders. In some cases, the user might have just needs of deleting all the files excluding the folders that are storing the files.
There is a trick to include contextual menu item named as “Empty Folder Contents” into the right click context menu in Windows XP operating system. This trick also works on Vista, Windows Server 2003 as well as 2008.
Just follow the following steps to run the “Empty Folder Contents”:
- Open Registry Editor (regedit).
- Go to the next registry key given below:
- Just right click on this shell folder after that select New then Key. Make the new sub key named as “Empty Folder Contents”, or name it as you like.
- After that right click on the option Empty Folder Contents after that pick New then Key. Give the name to the sub-key as “Command”.
- Below the sub-key naming Command, click twice on the Default value data which is situated at right window.
- There is dialog window “Edit String” on the pop-up menu, put in the next value:
cmd /c "cd /d %1 && del /s /f /q *.*"
- Click option “OK”. Save the setting then close the Registry Editor.
You can also download empty-folder-contents.zip folder and install it if you don’t want to edit and mess up with the system registry manually. After downloading, it allows to fuse the empty-folder-contents.reg values into your main registry.
Now, whenever there is a need to delete all its folder contents, you can just select Empty Folder Contents to delete by right clicking on the folder.