-
If the file is already imported into AE, check script
Hi, I’m writing a script to automatically import files into AE after a render.
I’m interested in the ability to create check conditions, the file is already imported into AE, if yes, do nothing, if not, import it.
And I have absolutely no idea how to implement such a check for the existence of the file itself in AE.
In what direction to move?
var file = new File(nPath);
if (file.exists) {} else {
createPNG(comp, 0, File(nPath)); // Create PNG
var importFile = app.project.importFile(new ImportOptions(File(nPath))); // Impost File
var addComp = comp.layers.add(importFile); // Add File to Comp
importFile.parentFolder = addComp.containingComp.parentFolder // Move File to Folder
};