I need to use a script to delete the following:
e:\logs\logs1\
e:\logs\logs2\
I need to delete all files and folders within those two directories while leaving the original folders intact.
del *.* /Q /S leaves the subfolders
rd e:\logs\logs1\ /S deletes what I want but also deletes the logs1 directory. I need it to stay behind.
If this was Unix I'd have no problem.
OS is W2K3. It needs to be command line base and I can't install any 3rd party apps.
Help please.
e:\logs\logs1\
e:\logs\logs2\
I need to delete all files and folders within those two directories while leaving the original folders intact.
del *.* /Q /S leaves the subfolders
rd e:\logs\logs1\ /S deletes what I want but also deletes the logs1 directory. I need it to stay behind.
If this was Unix I'd have no problem.
OS is W2K3. It needs to be command line base and I can't install any 3rd party apps.
Help please.

Last edited: