Finding the name of the output file

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
ndeboar
Posts: 8
Joined: April 17th, 2005, 8:39 pm

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
Paul Tuersley
Posts: 704
Joined: June 5th, 2004, 7:59 am
Location: London, UK

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
Post Reply