Page 1 of 1

Get Source Filename

Posted: March 5th, 2014, 5:37 pm
by foxbot
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!

Re: Get Source Filename

Posted: March 6th, 2014, 1:08 am
by Dan Ebberts
This should work:

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


Dan

Re: Get Source Filename

Posted: March 6th, 2014, 8:56 am
by foxbot
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!!