New
#1
Deleting a directory structure without deleting the name of the root
HI
With the command prompt of Windows 7 SP1, how do I delete a directory structure with their files without deleting the name of the root directory?
THANKS
BYE
HI
With the command prompt of Windows 7 SP1, how do I delete a directory structure with their files without deleting the name of the root directory?
THANKS
BYE
So you want to delete the contents of a folder without deleting the folder itself? Would that also include sub-folders within that folder?
Simply enter cd <path to directory> at the prompt to make the required directory the target of the next command. Then, after verification that this is the correct directory and that you do indeed want to remove its contents, enter del *.* at the prompt. This should delete its contents, but not the directory itself. Please note that content cannot be easily recovered, which is why I asked you to verify the location first.
Open Win Explorer, highlight the directory in the left hand side, Which will display all sub-folder and files on the right hand side, select all on the right, Press the Delete Key.
Why fool with the CMD Prompt when it is so easily done in Explorer.