I know this is an old question, but I am having a very tough time getting this to work.
I would like to schedule a task on a windows 2000 server to delete files older than 5 days, within the c:\test directory:
I tried this batch file so far:
Forfiles -pC:\test -s -m*.* -d-5 -c "cmd /c del /q @path"
This really isn't my area, so please be a simple as possible. thank you.