Batch remove paths in PSD file
I found the script below which removes a path in a PSD file.
I want to apply this to over 3000 PSD files I have. Actions take too long and crash my computer. I want to be able to choose a folder which it will go through and run the script. If there is no path in the file, I want it to close it and move onto the next one. Actions caused my computer to stop and wait for my go ahead, and when I log errors to file, it keeps the file open which crashes my computer.
#target Photoshop
main();
function main(){
if(!documents.length) return;
var doc = activeDocument;
for(var a = doc.pathItems.length-1;a>-1;a--){
if(doc.pathItems.name != "Ex1") doc.pathItems.remove();
}
}
Also, can I ask how you run a script through a batch of files? Image processor looks good but doens't look any different to automate > batch to me. It won't let me select the script I want to use, just actions and I can't use those.
Many thanks in advance!
