Path change

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
CR
Posts: 4
Joined: October 1st, 2005, 1:14 pm

Is there a way to change the path of an item in the project window without using replace(). I want to change the paths from the local path to a network path.
from: D:\folder\xxxx.psd
to: \\machineName\D\folder\xxxx.psd

I wrote a script that works but when it replaces a .psd or .ai file it loses the information of how it was imported. (If it was a specific layer from the Photoshop file, COMP_CROPPED_LAYERS) and treats it as if the whole file were footage and not a specific layer from the Photoshop file. The GUIDE say the importAs info lives in the mainSource but I can't find a way to extract and retain the information. I've tried using reload() but you can't specify a path for this.
mpowers

That would very handy!

I wrote a network render VB utility , which uses PSexec to start AERender.exe. Our network has alot of machines - and not all of them can be mounted as a drive letter.

Could you post as it stands now? That would be great.

thnx
CR
Posts: 4
Joined: October 1st, 2005, 1:14 pm

I found a simpler way of changing the paths from local to network. If you navigate through the network to open your project, AE automaticaly adds the network paths to footage files.
This also redirects the render output paths through the network.


original path of project:

D:\usr\people\carl\ADOBE\AFTER_EFFECTS\TEST\xx.aep

New path:

\\Post1pc\D_DRIVE\usr\people\carl\ADOBE\AFTER_EFFECTS\TEST\xx.aep


//This script opens the project through the network to change to network paths.


var str = app.project.file.fsName, newstr = "";
for( var j = 0; j < str.length; j++ ){

//next line removes the colon after the drive letter
//and replaces it with _DRIVE, you may have to
//adjust this for your system.


if( str.charAt(j) != ":" ) newstr += str.charAt(j);
else newstr += "_DRIVE";
}
//next line tells it to do nothing if it
//already has a network path

if( str.charAt(0) != "\\" ){

var a = new Array();

a[0] = "//"
a[1] = system.machineName
a[2] = "/"
a[3] = newstr;

var my_file = new File( a.join("") );



app.open(my_file);

}

2 bugs I found.

1. The project and footage file must be on the same drive.
If you have a work drive that you keep your project on and a media drive that you keep your footage on it won't change the paths.

2. Save the original project locally.
If you open the project through the network then import some extra footage locally and resave the project through the network, the path won't change later

This is one part of a longer script that saves and increments a copy, changes the paths and then sends it to a watch folder on a server.

The original script I wrote used replace() which changed the paths no matter what drive the footage was on but was losing the .psd information.

I've been using the watch folder to render on multiple machines, but if you have any pointers on aerender please let me know.
I understand the concept and can get it to work on a remote machine but I'm not clear on how to send a project(or commands) from my machine to a remote machine. I have to go to the remote machine or machines and put in the command line in or run a bat file.
Post Reply