ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

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

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Kirill Pavlov
Delete files with script or allow after effects to overwrite previous copy automatically
on Oct 24, 2011 at 5:00:26 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


Return to posts index

Dan Ebberts
Re: Delete files with script or allow after effects to overwrite previous copy automatically
on Oct 24, 2011 at 5:33:51 pm

Try this:

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


Dan



Return to posts index

Anka Petkovskaya
Re: Delete files with script or allow after effects to overwrite previous copy automatically
on Apr 8, 2019 at 2:27:54 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!


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2019 CreativeCOW.net All Rights Reserved
[TOP]