delete on condition
Moderator: DosItHelp
delete on condition
looking for a script that only checks a folder and in the folder if, there is only one folder that starts with "abc_cdf" exits. If there are more than one folder starting with "abc_cdf", delete the ones that are older than 5 days. This script does not go inside the sub folders. It is not recursive.
Re: delete on condition
How much of the script have you written? 

Re: delete on condition
popular common easy stuff but not enough.:
for /f "delims=*" %%x in ('dir /b /ad-s-h C:\dirx\abc_cdf*') do rd "%%x" /s /q
for /f "delims=*" %%x in ('dir /b /ad-s-h C:\dirx\abc_cdf*') do rd "%%x" /s /q
Re: delete on condition
Look into forfiles.exe as it can handle a range of days old and is native to Vista and higher.
xxcopy also has good date handling capability, and is free for personal use.
xxcopy also has good date handling capability, and is free for personal use.