Skip to main content
ecurran00
New Participant
November 8, 2021
Question

Script to Add File Extensions to Multiple Layers

  • November 8, 2021
  • 2 replies
  • 474 views

Hi all, I'm having a hard time coming up with a quick scripting solution to help my team. We have files with 50-100 layers inside of Photoshop. We'd like to find a solution to add a .jpg file extension to the name of each layer without typing it out manually. I've found some scripts that add a generic suffix to one layer at a time, but it's not the right solution for us. For furter clarification, we don't want to overright the full name of each layer, we just want to add a file extension to each one so it exports correctly when we generate assets. Also, if anyone wants to go a step further, I would be very very interested if someone could come up with a way to add an extension to a selected group of layers in Photoshop. For example, if I selected 60 layers out of 100, ran the script, and suddenly had 60 layers renamed with a .png extension, leaving me with 40 layers with no extension at all, that would open up some really interesting workflows for us. Thanks, any responses/ideas will be super appreciated.

This topic has been closed for replies.

2 replies

Stephen Marsh
Community Expert
November 9, 2021

One good option here from Paul Riggott - Layer Name Edit:

 

Layer Name Edit.jsx

 

 

Downloading and Installing Adobe Scripts

Chuck Uebele
Community Expert
November 8, 2021

Are your layers in groups/layer sets? If not, it's just a simple loop through the layers, where you have the  current layer name equal itself and the .jpg extension. On my phone right now, which isn't  very easy to type out code, and see if it works.

ecurran00
ecurran00Author
New Participant
November 9, 2021

I wonder if you'd be able to provide the code example when time permits? I'd really like to try this idea, but sadly my knowledge of javascript is quite limited.