Get Source Filename

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
foxbot
Posts: 9
Joined: April 23rd, 2013, 8:57 pm

March 5th, 2014, 5:37 pm

Hey all,

I'm trying to get the filename of some footage items for a script I'm writing. Using app.project.item(index).name gives me the display name from the Project panel but not the actual filename. Generally they are one and the same but occasionally they get changed for one reason or another. Thanks for the help!
Dan Ebberts
Posts: 319
Joined: June 26th, 2004, 10:01 am
Location: Folsom, CA
Contact:

March 6th, 2014, 1:08 am

This should work:

unescape(app.project.item(index).mainSource.file.name)


Dan
foxbot
Posts: 9
Joined: April 23rd, 2013, 8:57 pm

March 6th, 2014, 8:56 am

Thanks Dan! I never knew about unescape either. I thought I was going to have to write a replacement function to decode all of the special characters. Thanks!!
Post Reply