Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Return file path

Explorer ,
Oct 20, 2011 Oct 20, 2011

What kind of command would I use to return the file path of the after effects project?

Also, is there a way to call a python script from within the script or even embed a python funtion into the script itself? We have some libraries for file management that we use for nuke and some of the functions I'm going to need to recreate in extendscript but if there was possibly a way to call those functions and return a value it could save me some time not reinventing the wheel.

TOPICS
Scripting
1.8K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Oct 20, 2011 Oct 20, 2011

The complete path would be:

app.project.file.path + "/" + app.project.file.name

(assuming the project has been saved).

I'm not sure about the python stuff, but I suspect you can't do it. Please report back if you find out otherwise.

Dan

Translate
Community Expert ,
Oct 20, 2011 Oct 20, 2011

The complete path would be:

app.project.file.path + "/" + app.project.file.name

(assuming the project has been saved).

I'm not sure about the python stuff, but I suspect you can't do it. Please report back if you find out otherwise.

Dan

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 21, 2011 Oct 21, 2011

Perfect, thanks. I've been looking for how to modify file paths to move to and from different folders based on the location of the file. I'm not sure the best way to search for that, and most of my results lead me to topics on navigating for web.

What I want to do is be able to search for a specific word in the file path, ie 'renders' and then append a string '_v' and then a number taken from user input like '005'. Or give the user an option to find the newest version.

Are there ways to do this in extendscript? I would think there was a way, but unfortunately I don't really know what to call this in order to search for the answers I'm looking for.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 21, 2011 Oct 21, 2011
LATEST

Once you have the path, you can manipulate it using JavaScript's string operations, but to get it to point at a new folder, you need to use ExtendScript's Folder() constructor. You should check out the JavaScript Tools guide, which you can get to from the ExtendScript editor's Help menu.

Dan

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines