Batch Archive Projects Script

johnmeyer wrote on 5/25/2005, 7:19 AM
Some of you don't monitor the scripts forum, so I'm cross-posting this link to a script I just put there that lets you archive mulitiple projects in one step. Each project is put in its own folder (directory for those that still think in MS-DOS terms).

I was going to upload this to VASST, but their upload facility is broken.

Here's the link to the post over in the scripts forum:

Batch Archive Projects Script


Chienworks wrote on 5/25/2005, 7:28 AM
Thanks John! has a script upload section too.
johnmeyer wrote on 5/25/2005, 10:59 AM
You can download this from Ed Troxel's site (jetdv):

Batch Archive Script

and also from VASST:

Batch Archive Script (from VASST).

RNLVideo wrote on 5/26/2005, 7:00 PM
Johnmeyer - I changed the path in the script to one that exists on my system; when I run the script I get the following error (these are the details): Is it me or the script?

Compilation error on line 23:

Unterminated string constant

System.ApplicationException: Failed to compile script: 'C:\Program Files\Sony\Vegas 6.0\Script Menu\Complete Converted Script Download\ArchiveAllProjectstoNewDirectory.js'
at Sony.Vegas.VSAManager.Compile()
at Sony.Vegas.ScriptHost.RunScript(Boolean fCompileOnly)
johnmeyer wrote on 5/26/2005, 7:16 PM
I don't recognize that error. Can you copy/paste into your reply the exact line from the script that you altered? Also, did you change anything else?

Finally, where did you get the script? Did you copy/paste it from my post, or did you download it from Ed's site? There are problems with line break vs. CR/LF characters when you copy it, so I recomment that you download from jetdv's site:

Batch Archive Script
RNLVideo wrote on 5/26/2005, 7:29 PM
Sure! I only altered the path line - here it is:

var defaultOutputDir = "C:\ProjectArchive\";

I downloaded the script from jetdv's site; saved it straight into my scripts folder and ran it.

johnmeyer wrote on 5/26/2005, 7:33 PM
Try this instead:
var defaultOutputDir = "C:\\ProjectArchive";
That's right, two backslashes after the colon, and no trailing backslash. If you still have the original download of my script, go back and look at the directory path in the original file and you'll see that's the syntax I used.

RNLVideo wrote on 5/26/2005, 7:35 PM
Ha! It's running as we speak! Thank you!

RNLVideo wrote on 5/26/2005, 7:38 PM
Ok - probably not possible, but worth asking.... Is there any way to get past the separate audio & video files?

jetdv wrote on 5/26/2005, 10:02 PM
This script basically does the "Save and trim" feature of Vegas. That feature saves the video and audio separately. Therefore, the script does too.
johnmeyer wrote on 5/26/2005, 10:04 PM
Ok - probably not possible, but worth asking.... Is there any way to get past the separate audio & video files?

You need to talk to Sony about this one. That's the way archiving works. Many people have discussed this in these forums, and most don't like the separate WAV files. This creates many issues if you actually need to recover an asset from the archive back to your original project. Also, if you use MPEG or other similar video files in your project, the Vegas archive function includes the ENTIRE file, not the trimmed version. This can be quite a surprise if you are just using small snips from really large video archives. I guess the reason for this is that Sony still hasn't written the software to do simple trims of MPEG-2 files. I keep asking and posting, every chance I get. Maybe someday they'll do it.

RNLVideo wrote on 5/27/2005, 4:14 AM
Done - via the product suggestion page. I've rarely used the save & trim function because of the separate files. With your script, I have new reason to use it, but I hope Sony realizes how much better life would be if they fixed it!
BrianStanding wrote on 5/27/2005, 5:41 AM

Will this script let me save a veggie file with offline media, so I can just batch recapture files, if I don't want to save the trimmed .AVIs?
johnmeyer wrote on 5/27/2005, 7:40 AM
Will this script let me save a veggie file with offline media, so I can just batch recapture files, if I don't want to save the trimmed .AVIs?

Interesting thought. No,I didn't include that, although I can see exactly how such a script could be written. There's lots of code lying around that "walks through" the media pool assets (which includes media not currently used). My code alread creates the directories. I think it would be just a matter of taking the one line that calls the Vegas archive function and replacing it with a user-defined function that walks through the media pool and writes each file found there. One problem would be duplicate file names in different directories, because everything is now being put in one single directory. However, my existing script has the same problem.

Anyway, I have no plans to write such a thing, but it is probably less than fifteen minutes work for someone that would like to take it on as a fun exercise.
jetdv wrote on 5/27/2005, 7:44 AM
If you simply delete the source AVI files, don't you then have a VEG file with "offline media, so I can just batch recapture files"?
BrianStanding wrote on 5/28/2005, 5:43 AM
I'll try it and see. Thanks, John and Edward!