OmegaT has a great safety feature: it automatically backs up project memory files (i. e. project_save.tmx) on every project (re)load, plus it creates another backup file on every save (if the project was changed since the last load or save). Those backup files can be used in an extremely rare case when something happens to the main project memory and all of the work seems to be lost. It happened to me once when I was only starting to use OmegaT as my main tool, and was I glad this backup feature was thought of!
But this very feature can become a tiny problem, especially in ongoing projects where project_save.tmx keeps on growing bigger and bigger. While creating backups is great and very helpful, there’s no routine to remove old backup files. It isn’t uncommon in some of the projects that I work at that project_save.tmx is a few MB’s, but omegat folder where that file is located, is over 100 MB’s or more, and only because of all the backups. With modern disk sizes it’s not a big deal, and it doesn’t degrade OmegaT’s performance a bit, but sometimes there’s a need to make a project slim again (like when you’re going to send it to your colleague or client, or copy it to cloud storage or another computer, or you’re obsessed with keeping everything trim and slim and tidy).
So, anyway, after all these numerous words here’s what I’m getting at. At Sourceforge.net (download link) there’s this script that removes all the backups of project_save.tmx (including the ones created in team projects before performing sync), everything in target folder (as usually in the projects that need this cleaning, source files are changed, but old target files sometimes just keep on piling up), and also three TMX files created in the root of the project every time target files are produced.
About a year ago I put together the original version of this script, but this new version downloadable from Sourceforge.net contains a few improvements and can easily be localised if you care to be warned about file deletion in your language.
Use it to your heart’s content and your own risk, and I’ll be very thankful for any questions, suggestions or comments.
DISCLAIMER: If you lose your work without any hope to recover because all backups have been deleted by this script, it ain’t my fault. You should backup regularly and not hope that OmegaT will do it for you.