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

Batch rename top layer in many PSD files

Participant ,
Jan 07, 2024 Jan 07, 2024

Copy link to clipboard

Copied

Hi,

 

I am looking for a way to batch rename the top layer in many PSD files to say "First"

I have 100s of PSD files and I have to rename top layer on all those files to "First", how can I achieve it?

TOPICS
Actions and scripting

Views

92

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

correct answers 1 Correct answer

Community Expert , Jan 07, 2024 Jan 07, 2024

The simplest way is generic:

 

activeDocument.layers[0].name = "First";

 

However, if you don't wish to affect existing layer visibility, then another generic approach is:

 

if (activeDocument.layers[0].visible === false) {
    activeDocument.layers[0].name = "First";
    activeDocument.layers[0].visible = false;
} else {
    activeDocument.layers[0].name = "First";
}

 

Further checks could be implemented to only affect certain specific layer kinds.

 

You can then record the script into an actio

...

Votes

Translate

Translate
Adobe
Community Expert ,
Jan 07, 2024 Jan 07, 2024

Copy link to clipboard

Copied

The simplest way is generic:

 

activeDocument.layers[0].name = "First";

 

However, if you don't wish to affect existing layer visibility, then another generic approach is:

 

if (activeDocument.layers[0].visible === false) {
    activeDocument.layers[0].name = "First";
    activeDocument.layers[0].visible = false;
} else {
    activeDocument.layers[0].name = "First";
}

 

Further checks could be implemented to only affect certain specific layer kinds.

 

You can then record the script into an action, then use Automate > Batch to apply the action to multiple files.

 

Of course, a batch script could also be created.

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
Participant ,
Jan 07, 2024 Jan 07, 2024

Copy link to clipboard

Copied

Thanks, worked accurately

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 ,
Jan 07, 2024 Jan 07, 2024

Copy link to clipboard

Copied

LATEST
quote

Thanks, worked accurately


By @StarAG​

 

You're welcome!

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