Skip to main content
Participating Frequently
May 21, 2024
Answered

Layer name used to save file with Action or Script

  • May 21, 2024
  • 3 replies
  • 1426 views

Hi there, 

I’m new to posting in the community. 
I’m hoping for some advice or assistance in setting up an action or a script to do the following.

I have a PSD template that I have set up an action to drop a PNG file into the bottom layer. 

What I need is an automation of some sort that inserts the name of the Layer that I just dropped into the template to be added to the front of the PSD file name and saved as a jpeg for web. 

I have just got my head around Actions, and Scripts are quite advanced for me.  🙂

This topic has been closed for replies.
Correct answer Stephen Marsh

I forgot to mention, that the other way to do this is to use Layer Comps, saving each comp with the name you require, then use the default Export Layer Comps to Files script.

 

https://helpx.adobe.com/au/photoshop/using/layer-comps.html

 

3 replies

Stephen Marsh
Community Expert
Community Expert
May 23, 2024

@AEL-13 - So how did things go?

Stephen Marsh
Community Expert
Stephen MarshCommunity ExpertCorrect answer
Community Expert
May 21, 2024

I forgot to mention, that the other way to do this is to use Layer Comps, saving each comp with the name you require, then use the default Export Layer Comps to Files script.

 

https://helpx.adobe.com/au/photoshop/using/layer-comps.html

 

Stephen Marsh
Community Expert
Community Expert
May 21, 2024

You'll need a script for the final save JPEG step, as including a layer name in the final file name is beyond actions or batch commands.

 

This could be a custom script, or an all purpose, generic layer saving script.

 

It might be better to have the whole action re-created as a script, rather than having a hybrid action that relies on a script? That is of course up to you, I'm happy to help, but I would need to see a screenshot of the action steps with each step expanded/disclosed and or have access to the action if it is too complicated to decipher from the screenshot.

 

When you "drop in" (how – File > Place or something else?) the PNG file into the template, what is the name of the layer? Is it the filename of the PNG? Can you post a screenshot of the layers panel?

 

 

AEL-13Author
Participating Frequently
May 21, 2024

Hey Stephen, 
Thanks for replying. 

Here is a Screen Shot. 

The layer called Abstract Art 53 is the layer that I have dropped in. 
I play an action that turns each folder on and off and saves it in jpg for web with the Abstract Art - 53 (or other files I drop in, in it's place) behind the folder layers. 

What I am trying to achieve is to insert the Abstract - 53 layer name in front of the PSD files name when i run the action I mentioned above for saving the jpg. 

DId that make sense?

 

Stephen Marsh
Community Expert
Community Expert
May 21, 2024

OK, so it's a smart object layer....

 

As the name will vary, there needs to be a way to identify it in automation.

 

Is this the only smart object in the layer panel? 

Will the smart object layer always be in the same absolute position in the layer stack?