Skip to main content

We often do collect files once a project is done in After effects, there are some cases where you might need the locations of each and every file so that you can do further processing on them. Here is a small script for After effects that goes through the files , gets their path and stores it in a text file.

 {  
var txtFile = new File("~/Desktop/collector.txt");
txtFile.open("w","TEXT","????");
txt = "";

 for (i=1;i<=app.project.numItems;i++) {
    if (app.project.item(i) instanceof FootageItem) {
         if (app.project.item(i).file != null && !app.project.item(i).footageMissing) {
            var extension = app.project.item(i).file.toString() +   "\n" ;
            txtFile.write (extension)
            }
        }
    }
 txtFile.close();
 txtFile.execute();  
}  

Leave a Reply