4

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

dazzafact
  • 2,570
  • 3
  • 30
  • 49

1 Answers1

5

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);
}
fabianmoronzirfas
  • 4,091
  • 4
  • 24
  • 41
  • Beware, `Returns File object or null if project has not been saved; read-only.` (from: https://ae-scripting.docsforadobe.dev/general/project/#project-file) – Artfaith Mar 23 '21 at 16:54