0
Scripting: Move files in the specified folder to the trash
Explorer
,
/t5/after-effects-discussions/scripting-move-files-in-the-specified-folder-to-the-trash/td-p/13492334
Jan 15, 2023
Jan 15, 2023
Copy link to clipboard
Copied
The code here stores all files on the folder where the selected footage exists in the array "trgfiles".
var folderPR = app.project.selection[0].file.fsName.replace(/\\/g,'/'); var hoge = folderPR.lastIndexOf("/"); var folderPath = folderPR.slice(0,hoge+1); var folder = new Folder(folderPath); var trgfiles = folder.getFiles();
I would like to create a script to move all the files in trgfiles from here to the recycle bin.
Here is the link I am referring to, but it does not work.
TOPICS
Scripting
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
shusaku_tr
AUTHOR
Explorer
,
LATEST
/t5/after-effects-discussions/scripting-move-files-in-the-specified-folder-to-the-trash/m-p/13492341#M221408
Jan 15, 2023
Jan 15, 2023
Copy link to clipboard
Copied
Sorry, the code is hard to see, I will fix it.
var folderPR = app.project.selection[0].file.fsName.replace(/\\/g,'/');
var indx = folderPR.lastIndexOf("/");
var folderPath = folderPR.slice(0,indx+1);
var folder = new Folder(folderPath);
var trgfiles = folder.getFiles();
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

