[script] Automatic backup of daily changes

Ask questions about how to create a script or swap scripts with other users.
Post Reply
User avatar
Posts: 1966
Joined: 13 Oct 2009 13:48
Location: Kraków, Poland

[script] Automatic backup of daily changes

Post by pjj »

Three years ago (yes! how quickly time flies! tempus fugit!) I wrote Simple Backup System for RJ TE and it's served me well since that time (and I hope it has served you well, too!) However this script has one (at least :wink:) weak point: you need to remember to run it... It would really be cool to be able to backup your files from within RJ TE automatically! And now you can, thanks to Rickard and this tiny little script.

Attached please find Backup of Daily Changes script and its companion: batch file. You need to 1) put this batch file into a directory, where you keep your projects' directories and 2) point the .jsfs file to it (just edit one variable), and also 3) add the script as a tool (menu Tools > Configure Tools... > Add) to run it on project close. You will also need 7za.exe (command line version of free 7z archiver) in C:\Program Files\7za; you can download it here (go for "7-Zip Extra: standalone console version, 7z DLL, Plugin for Far Manager").

How it works? On project close (so also on editor close) script runs batch file with project directory as a parameter; batch file prepares list of files from that directory with today's update date and archives them to /projectDir/#backup directory with daily-changes.yyyy-mm-dd.7z name. In other words, each time you close a project all its files, that you have updated on the same day, will be archived. Of course before setting this script full backup of project files is recommended.

Known limitations? If you close your project after midnight, previous day's work won't be saved (of course).

I hope you'll find it useful!

(1.12 KiB) Downloaded 371 times
(Even though I set "Open output window" to "Never", "Message" panel opens up for me with 7za message. Either I don't know how it's supposed to work or it's a bug.)
Alium tibi quaere fratrem; hic, quem tuum putas, meus est. Titus Flāvius Caesar Vespasiānus Augustus

User avatar
Posts: 302
Joined: 20 Apr 2018 09:49

Re: [script] Automatic backup of daily changes

Post by yereverluvinuncleber »

I ALWAYS close my project files after midnight but that is a feature/limitation of me.
"Noli pati a scelestis opprimi"... or is it "non lacessit illegitimae te carborundum"?

You can find me on Deviantart https://www.deviantart.com/yereverluvinuncleber/gallery/

Post Reply