At work I was tasked with writing a script that would clean up and archive logs from an application that didn’t have any decent log rotation built-in. The application would however rotate the logs when the application’s service was restarted and then rename the old log with an incremental number suffix. So we added a…
Tag: archive
Move files in folders and subfolders older than one year
A colleague asked me if I could write a script that would move files within a folder or its subfolders that were older than one year into a new location but still keep the directory structure. I figured it would be quite a challenge so I decided to do it for him; kind as I…