I'm trying to figure out how I can make a script that does 3 things ( or 4 depends on how it's done ).
I have a folder with a lot of log files that takes up space. So I have made a script to remove all files older than 21 days:
Forfiles -s -m *.* -d -21 -c "cmd /c del /q @path"
But we also need a way to script that it always makes a .zip file with each days logs. Aka. take it's 2010/12/13 today and I want to .zip all files for each day before that. So each day gets their own .zip file. Also at the same time we need the files that has been zipped to be deleted so they don't take up space.
Can all this be done in a .bat script or do I need more cooks in this soup?