We've got a HUGE folder where we keep copies of databases, contracts, documentation etc etc for years and years. The data we generally receive or store as .zip files, but from time to time someone needs to look at it, so it's unzipped and forgotten. I've had the long talk about how unneccessary and wasteful this is, but the owners still want it. "Just in case of something".
Some of these files are database dumps 1gig+, sorted in about 400 folders with 5-8 subfolders each, which again can have 10+ subfolders. A nightmare to keep tidy, and its very important to keep the folder structure intact.
What would help me greatly is a script that does the following:
- Finds all .mdb, ldb, mdf, bak, dmp files not touched for more than 180 days and zips them as individual files in the same folder, keeping the filename (but of course changing extension to .zip), and then deletes the original files. Exception: If there is already a .zip file with the same name, I'd like a log/report telling me where, so I can compare dates of the original file and the one in the .zip file (and delete the original if they are the same). Or can this part be scripted as well?
Preferrably we would like the date of the original file be included in the .zip ([login to view URL]), if possible set the "modified" timestamp of the archive to that of the original file.
- Finds all .TXT files older than 180 days and bigger than 10MB, zips them as individual files in the same folders and keeping filename (extension change ok + original date in filename) and then deleting the original file.
- Deletes all empty folders (because users tend to be locked out from deleting folders because of [login to view URL])
- The data will later be moved to an off-site NAS without compression software, so we cannot move old files first, then compress them (would kill our WAN links).
We would prefer that this task is solved in a way that enables us to run it as a weekly scheduled task, using software that is free for commercial use.
Hello,
As an experienced Bioinformatician/Datamanager, I have to handle large quanties of data, and the organisation of it. I think that I might be of assistence to solve your project.
With kind regards