|I have a batch file that browses to a shared director and deletes files older than a week.|
forfiles -m *.* -d -8 -c "cmd /c del /q @path" 2> nul || ECHO NO FILES EXIST IN THE FOLDER OLDER THAN 1 WEEK (NO ACTION TAKEN)
If there are no files older than 1 week it will tell me so. If there are, it deletes them. Works fine.
I would like to change this so that when files are deleted it will say "Old files deleted" as well as when there are none to delete, which it already does.
Any ideas? Maybe an IF ELSE tied to the error stream somehow? Help is much appreciated.
ASCII Question, Get an ANSI