Very simple versioning script

I just got an email telling me that this very very old script of mine stopped working under CS5The script automatically creates a backup copy of the current document while saving. Apply cmd-S as shortcut for the script and you won't notice it is there.

I just got an email telling me that this very very old script of mine stopped working under CS5

The script automatically creates a backup copy of the current document while saving. Apply cmd-S as shortcut for the script and you won't notice it is there.

The new version of "save_with_backup" is now a JavaScript (i.e. works on PC as well as on Mac) with a few minor improvements.

Configuration

Before using the script you need to adjust three lines in the code to point to your preferred backup-location.

  1. var desktop_path = Folder.desktop.toString();
  2. // var backup_path = "/someFolder/someSubfolder/backupLocation";
  3. var backup_path = desktop_path+"/backup"

Currently the backupfolder is on the desktop. You could point to a deeper subfolder of the desktop by changing line 4

  1. var backup_path = desktop_path+"/diversesZeuchs/InDesign-Backups"

In case you want your backupfolder somewhere else, change the code like this

  1. var desktop_path = Folder.desktop.toString();
  2. var backup_path = "/someFolder/someSubfolder/backupLocation";
  3. //var backup_path = desktop_path+"/backup"

The Result

The script creates a subfolder structure. One subfolder for each day you do a save in the form yyyy mm dd and each document gets a time-prefix in the form hhmmss_

Comments

Automatically Run

New to scripts. I'm able to run this using Indesign CC. But only after I manually select the script to run. Is there a way to have the automatically run when I save an Indesign File?