Answered
Bulk packaging
ANy way to package a plethora of PSD files in one shot? I have for instance 20 PSD files that I want to package, each into their own of course... any scripts out there?
ANy way to package a plethora of PSD files in one shot? I have for instance 20 PSD files that I want to package, each into their own of course... any scripts out there?
Here is an improved 1.1 version of the script:
/*
Bulk Package.jsx
v1.1 21st December 2023, Stephen Marsh - Special thanks to c.pfaffenbichler for offering help in extending the original script
https://community.adobe.com/t5/photoshop-ecosystem-discussions/bulk-packaging/td-p/14308824
*/
#target photoshop
if (app.documents.length === 0) {
var selectFile = File.openDialog("Please select the file/s to package:", Multiselect = true);
var counter = 0;
for (var i = 0; i < selectFile.length; i++) {
var openFiles = app.open(File(selectFile[i]));
try {
savePackage();
openFiles.close(SaveOptions.DONOTSAVECHANGES);
counter++;
} catch (e) {
openFiles.close(SaveOptions.DONOTSAVECHANGES);
}
}
alert("Script completed!" + "\r" + "Files selected: " + selectFile.length + "\r" + "Files processed: " + counter);
} else {
alert('Please close all open documents before running this script!');
}
function savePackage() {
var theFolder = activeDocument.path.fsName;
var idpackageFile = stringIDToTypeID("packageFile");
var desc982 = new ActionDescriptor();
var idto = stringIDToTypeID("to");
desc982.putPath(idto, new File(theFolder));
executeAction(idpackageFile, desc982, DialogModes.NO);
}Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.