Search code examples
javascriptpathdirectoryextendscriptafter-effects

extendscript: get Filepath of Project


Iam trying to get the current Filepath of my After Effects project (not Jsx)

  var path=app.project['file'];

this variable "path" is giving me the a current FileObject name but it is a File-Object not a String. I need the alert as String. Or is there even a better way to get the Path as String?

enter image description here


Solution

  • Take a look at the File Object in the Object Model Viewer within Extendscript Toolkit or here.

    if(app.project.file !== null){
        var path = app.project.file.fsName;
        $.writeln(path);
    }