Skip to main content
Known Participant
January 9, 2023
Answered

scripting: get proxy folder path

  • January 9, 2023
  • 2 replies
  • 815 views

Hello, I wrote a simple script to get the path of the proxy folder selected in the project panel.

 

fileTrg = app.project.selection[0].file;
folderObj = new Folder(fileTrg);
alert(folderObj.fsName)

 

However, this alert returns my AfterEffects system folder. like this

C:\Program Files\Adobe\Adobe After Effects 2021\Support Files\tmp0000001

 

How to get correct proxy folder path? Thank you.

This topic has been closed for replies.
Correct answer Mathias Moehl

Not sure what you are trying to achieve.

If you have a project item selected and want the file object of the proxy instead of the original item, that should be

app.project.selection[0].proxySource.file;

according to the documentation linked by Mylenium

2 replies

Mathias Moehl
Community Expert
Mathias MoehlCommunity ExpertCorrect answer
Community Expert
January 9, 2023

Not sure what you are trying to achieve.

If you have a project item selected and want the file object of the proxy instead of the original item, that should be

app.project.selection[0].proxySource.file;

according to the documentation linked by Mylenium

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
Known Participant
January 9, 2023

Thank you! It's worked!!

Mylenium
Legend
January 9, 2023

This will never work. Refer to the scripting guide for proper procedures:

 

https://ae-scripting.docsforadobe.dev/items/avitem.html#avitem-proxysource

 

Mylenium

Known Participant
January 9, 2023

Thank you! That's unfortunate...