I´m working on a project with a bunch of PSD files with 3 layers. The background layer is unlocked and renamed with a number.
I must rename those files using the name of the renamed layer ("background").
I tried it with an action (double click on the layer, copying the layer name to the clipborard and paste it in the "save as" dialog.
But it doesen´t work, cause PS uses allways the same string recorded.
So, I think only a script will do that for me. Can sombody help me out ?
Something like this
var bottonLayerName = app.activeDocument.layers[app.activeDocument.layers.length-1].name var currentDocFolder = app.activeDocument.path; app.activeDocument.saveAs( new File( currentDocFolder +'/'+ bottonLayerName +'.psd'));
Note it assumes the active document has been saved at least once so has a filepath. And it doesn't check the layer name for numbers. It uses whatever name it finds i.e.will save a file named 'background.psd' if the bottom layer is a background layer.
THX a bunch, Michael!
You make my day :-)