Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Importing file by using the script file’s path

  • Importing file by using the script file’s path

    Posted by Emre Mutlu on June 30, 2022 at 2:41 pm

    Hello there,

    I’m trying import a file by using the script’s path. I have tried like this but it doesn’t work:


    var thisFile = File($.fileName);

    var basePath = thisFile.path;

    var resPath = basePath+”/res/”;

    var paperFile = resPath+”paper.png”;

    app.project.importFile(new ImportOptions(File(paperFile)));

    Any ideas what’s wrong with these lines or any other way to do this?

    Emre Mutlu replied 3 years, 10 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    June 30, 2022 at 2:53 pm

    Your code works fine for me.

  • Emre Mutlu

    July 1, 2022 at 7:28 am

    Looks like it’s a bug. I have delete the file and copy again and it works. Thank you.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy