Tech Support > Microsoft Windows > Performance/Maintainence > Delete just the contents of a directory
Delete just the contents of a directory
Posted by Owkmann on January 19th, 2008


How can I use the command window to delete just a directory's contents
(files and subdirectories) without deleting the directory?

rd /s removes the current directory and all subdirectories
del just removes files, not subdirectories

Thanks for any help,

Owkmann


Posted by mikeyhsd on January 19th, 2008


it is saver to do it from Windows Explorer.
is here some reason why you cannot us it.
it is all too easy to screw things up using manual commands.



mikeyhsd@sprintpcs.com



"Owkmann" <owkmann.no.spam@yahoo.no.spam.com> wrote in message news:%23fYd3MkWIHA.1132@TK2MSFTNGP06.phx.gbl...
How can I use the command window to delete just a directory's contents
(files and subdirectories) without deleting the directory?

rd /s removes the current directory and all subdirectories
del just removes files, not subdirectories

Thanks for any help,

Owkmann