Very good stuff, but one comment, one question on this:
Comment:
If you want to have it delete files older then 90 days, you need to move the line
forfiles.exe -p. -s -m*.txt -d-10 -c"zip -m @FILE.zip @FILE"
to the end (after the 4 lines to delete files); otherwise, it zips everything older then 10 days, then when it gets to the lines to find files older then 90 days, it doesn't find anything because zipping the files changed the modified date on all of them.
Question:
Should the lines to delete files also delete the folders? Once I figured out that the zip portion needed to come after the delete portion, it still doesn't appear to be removing the older folders--not sure if I did something to cause this, or if it doesn't delete them by design.
|