Copy link to clipboard
Copied
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.
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
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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
Find more inspiration, events, and resources on the new Adobe Community
Explore Now