Skip to content

Instantly share code, notes, and snippets.

@adamcoulombe
Created February 27, 2015 20:34
Show Gist options
  • Save adamcoulombe/ae804c3ddc99ce1127f0 to your computer and use it in GitHub Desktop.
Save adamcoulombe/ae804c3ddc99ce1127f0 to your computer and use it in GitHub Desktop.
Photoshop Script: Update all Linked Smart Objects in a Folder of PSD files
var folderPath = "/c/Users/Adam/Projects/myproject"
//var inputFolder = Folder.selectDialog ("Select the folder that contains the files for export:");
var inputFolder = Folder(folderPath);
var files = inputFolder.getFiles (/\.(psd)$/i);
for (var i = 0; i < files.length; i++) {
var f = files[i];
var doc = app.open (f);
try{
var desc = new ActionDescriptor();
executeAction( app.stringIDToTypeID('placedLayerUpdateAllModified'), desc, DialogModes.NO );
} catch(e) {}
doc.save ();
doc.close ();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment