Page 1 of 1

Finding the name of the output file

Posted: April 19th, 2005, 1:27 am
by ndeboar
Hey,

Im trying to determine the file name of the output module, eg movie.mov.

[app.project.renderQueue.item(1).outputModules[1].file]

Gives me the full file location (eg c:/folder/movie.mov), but i just want the movie bit. Ive been experimenting with some of AE's string functions with out much luck, any ideas?

Cheers,

Nick D

Posted: April 19th, 2005, 4:19 am
by Paul Tuersley
You were pretty close, try this:
app.project.renderQueue.item(1).outputModules[1].file.name

and just for completeness, here's how you might have used the string methods to isolate the file name from the path:
theFileString = app.project.renderQueue.item(1).outputModules[1].file.toString();
theIndex = theFileString.lastIndexOf("/");
theName = theFileString.substring(theIndex + 1, theFileString.length);
alert(theName);


Paul T