Comments

jetdv wrote on 5/28/2004, 4:59 PM
Yes. Just use the standard Windows API calls for changing file names.
2G wrote on 5/28/2004, 10:51 PM
I wasn't clear. I don't want to change the name of the file on the disk. I know how to do that. I want to change the name of the file(s) that Vegas loads for clips.

Specifically, when I get ready to archive a project that I 'probably' won't have to rebuild again, but want to keep around just in case, I do a batch render of all the AVI files to mpg. But the project file is looking for .avi files. I know I can manually go through the process the next time I load the project of telling vegas the new name of every clip, but that's a pain when I have 100+ separate clips from different files in a project. I'd just like to write a script that would go through and find all references to .AVI files and tell vegas to now look for the .mpg filename version.
rcampbel wrote on 5/31/2004, 8:03 AM
Vegas 5 has a Media.ReplaceWith(Media other) method that should do the trick.

For Vegas 4, it looks to be a bit more difficult. You would have to create a new Media object for your mpg files, then go through all of the TrackEvents, and create a new Take for each event that references the correct MediaStream from the new media object and add this Take to the TrackEvent. Then you would remove the old Take.

I haven't tried this, but in looking at the API it looks like this should work.

Randall
2G wrote on 6/1/2004, 10:25 AM
Thanks a bunch. I am using V5, so that's not a problem. I had overlooked that API.

2G