I'm creating nightly backups using cygwin bash with this one line script:
zip -r "K:/backup/outlook/`date "+%y%m%d%M"`" C:/Documents\ and\ Settings/siegfried/Local\ Settings/Application\ Data/Microsoft/Outlook
How can I enhance my script using the "rm" command so I never have more than 4 zip files and the oldest is deleted?
I could use the cygwin bash "find" command to delete files older than four days, but this is not what I want (what if I miss doing backup one day or several days? I would not want to loose all my backups if I failed to do it regularly).
Also, is there any way to write a bash script that will kill the outlook process that locks these files? Hmmm... that may be more of a windows question that is more appropriate for a different forum...
Thanks,
Siegfried
Thanks,
siegfried