Page 1 of 1

get first file name of image sequence

Posted: July 4th, 2006, 12:31 pm
by pirelouit
Hi! What would be the best way to get the name of the first file of an image sequence?

The reason I need this is that on some instances, import truncates the name of image sequences and I need my script to set the timecode accordingly with the first frame of the image sequence.

Thanks for the help

Posted: July 4th, 2006, 4:30 pm
by Paul Tuersley
Here's a quick example that returns the full untruncated name of the first file in an image sequence (this script assumes it's the first file in the project window) :

Code: Select all

{
items = app.project.items;
alert(items[1].file.name);
}
The important part is .file.name, if you just use .name it will return the name as shown in the project window.