forfiles.exe scripting
- by PHLiGHT
I'm looking to automatically delete files older than 7 days old with forfiles. The code below works when I manually do it it and respond yes to deleting the files. How can I incorporate the yes into this?
This is the output
E:\Documents and Settings\Administratorforfiles -p "H:\SHARED\Sca
ns" -s -m . -d -7 -c "cmd /c del @path"
Could Not Find H:\SHARED\Scans.DS_Store
H:\SHARED\Scans\XXX\DOC006.XSM*, Are you sure (Y/N)?