is it possible to copy the current active layer name in Photoshop and use it as the file name for a ‘Save As’ command in a Photoshop action?
Export Layers to Files isn’t suitable because I only want to save a single jpg at a particular point in the action, but because the action is recursive I need a way of changing the filename so that the resulting jpg isn’t overwritten with each recursion.
Many thanks!
2
Answers
Have you tried :
"Export layers to files..."
inFiles
,Script
? You don’t tell us which method you are using right now.This should export each layer with their name + a custom prefix of your choice.
Also, you may want to take a look at the
Insert Menu Item
that lets you record a set of actions and then does it automatically. If you need something more complex than the first option, this might be your solution.It’s possible to get the name of the
activeLayer
and save it within an variable:If you want to
document.saveAs()
you should set theasCopy
parameter totrue
:This will prevent a name change of the file you’re working with.
Instead of
document.saveAs()
you could usedocument.exportDocument()
in case you want a really small JPEG output.