• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Script to Add File Extensions to Multiple Layers

New Here ,
Nov 08, 2021 Nov 08, 2021

Copy link to clipboard

Copied

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.

TOPICS
Actions and scripting

Views

204

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Community Expert ,
Nov 08, 2021 Nov 08, 2021

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 09, 2021 Nov 09, 2021

Copy link to clipboard

Copied

LATEST

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 09, 2021 Nov 09, 2021

Copy link to clipboard

Copied

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

 

Layer Name Edit.jsx

 

Layer-Name-Editor.png

 

Downloading and Installing Adobe Scripts

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines