Generation

generate functionWed, 12 Apr 2023

After Effects script Move all video files in the projects root folder into the folder „Footage/Video Assets“ and all audio into the folder „Footage/Audio Assets“

// DESC: Move all video files in the projects root folder into the folder „Footage/Video Assets“ and all audio into the folder „Footage/Audio Assets“ // INPUT: // OUTPUT: // USAGE: var f = new Folder(app.project.file.parent.absoluteURI + "/") // get all files in root var files = f.getFiles() // loop through all files for (i=0; i<files.length; i++) { if (files[i] instanceof Folder) continue // get extension var ext = files[i].name.split(".").pop() if (ext == "mov" || ext == "mp4" || ext == "mpg" || ext == "mpeg" || ext == "mts") { // create video assets folder var vf = new Folder(app.project.file.parent.absoluteURI + "/Footage/Video Assets/") if( !vf.exists ) vf.create();

Javascript
Generate More

Questions about programming?Chat with your personal AI assistant