Open Latest File Version- Compare proj with auto-saved files

All things .jsx

Moderator: Paul Tuersley

Post Reply
Posts: 28
Joined: August 8th, 2006, 3:25 pm
Location: Lewisville, TX

July 21st, 2009, 1:30 pm

Every once in a while I will be working on a project and AE will crash without giving me a chance to save (that never happens to you guys right?). Well, since I use the auto-save feature, I will quickly look to see if the project I was working on was manually saved later than all of the auto-saved files in order to figure out which file to open. Seeing as I'm a stickler for efficiency (or am I just lazy?), it bugged me that I had to manually compare the project files and open the most recent version. It was also frustrating to have to duplicate the latest auto-saved version and overwrite the main AE file.

So, I came up with a script creatively named "Latest Version" that automates this process. This script takes an AE file and compares its modified time to that of those in the auto-save directory for that AE file. It then presents a prompt for the user to select what action they would like to take (open main file, open latest auto-saved file or overwrite the main file with the auto-saved file and then open the main file).
(4.11 KiB) Downloaded 556 times
The main script window (can be a floating window or a docked panel).
screenshot_01.png (16.38 KiB) Viewed 6063 times
1. Click on 'Select Project'. If you would like to use the current project's file, select 'Use Current'.
2. Once you select the main file, the script will begin to compare the modification times of the auto-saved files with that of your selected (main) file. If it cannot find a new auto-saved file, the script will let you know and then quit.
3. If there is a newer auto-saved file, you will be presented with information about the files and three options:

Option 1: Open the main file.
Option 2: Open the auto-saved file.
Option 3: Overwrite the main file with the auto-saved file and open the main file.

NOTE: Overwriting the main file with the auto-saved file cannot be undone so you will be asked to confirm this option. Once you have confirmed, the main file will be overwritten with the auto-saved file (and consequently renamed to the main file's name).
The comparison window. This notifies the user that there is a more recent version of the project they are working on, shows the modification information to the user and gives them options.
screenshot_03.png (63.44 KiB) Viewed 6063 times
Please let me know if you encounter any errors! Enjoy!

Copyright info:
Latest Version 1.1 by Collin Brooks is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.
Posts: 28
Joined: August 8th, 2006, 3:25 pm
Location: Lewisville, TX

July 22nd, 2009, 8:26 am

Latest Version 1.1 has been uploaded and the post above has it for download.

New in version 1.1:
-The 'Select Project' button is now centered.
-Now, if you select a project (when not using "Use Current") and it is the latest version, it asks if you would like to go ahead and open it up.
Posts: 47
Joined: July 14th, 2008, 12:19 pm
Location: The Netherlands

July 22nd, 2009, 3:17 pm

Nice, i hate it when AE Crashes
Thanks :)
Post Reply