Remove Directory using wildcards
I am using windows 2003 Sp2 and need to run a script to delete folders that start with SB on a scheduled basis. I tried rmdir d:\jobs\SB* /q /s ,but it doesn't work. There are other folders in the directory that need to remain. Just want
to remove the ones that start with SB
February 21st, 2011 11:53am
RMDIR does not allow wildcard characters.
The following should work from a batch file.
FOR /D D:\jobs\SB* %%X IN (SB*) DO RD /S /Q "%%X"
Free Windows Admin Tool Kit Click here and download it now
February 21st, 2011 1:23pm