Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Delete files with script or allow after effects to overwrite previous copy automatically

  • Delete files with script or allow after effects to overwrite previous copy automatically

    Posted by Kirill Pavlov on October 24, 2011 at 5:00 pm

    Hi everyone,
    Got a problem.

    It there any way to delete files with script outside AE or stop AE promting ifit can overwrite previous copy?

    My way


    //create new folder
    var SaveTo = "H:/desktop/folder/"
    var SaveFolder = new Folder(SaveTo);
    SaveFolder.create();

    //create bat file
    var exe_shutoff = new File(SaveTo + "shutoff.bat");
    exe_shutoff.open("w");
    exe_shutoff.writeln("del render.avi");
    exe_shutoff.close();
    exe_shutoff.execute();

    When I run this script from AE it creates *.bat file but doesn’t run it.

    If i run it from windows – it successfully deletes itself.

    Or maybe there is any way to do this with “system.callSystem” method?

    Director of animation and CG

    Anna Petkovskaya replied 7 years, 1 month ago 3 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    October 24, 2011 at 5:33 pm

    Try this:

    app.beginSuppressDialogs()
    myProject.renderQueue.render();
    app.endSuppressDialogs(false);

    Dan

  • Anna Petkovskaya

    April 8, 2019 at 2:27 pm

    Gee, I accidentally REPORTED the correct answer, OMG, webmaster should really change the way one can report a post cos many as I did could thought at first sight it looks like “REPOST/REPLY” – sorry for that! ☹

    I just wanted to say to the author that it is the actual solution to overwrite existing files which I successfully used in my rendering script…thanks for that!

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