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

Find/Replace for layers in photoshop

New Here ,
Dec 02, 2025 Dec 02, 2025

Would like to see a simple Find/replace name/text on layers in Photoshop. I do alot of production work using artboards and would like to easily change the file names of my assets without having go layer by layer to do so.

Idea No status
TOPICS
Actions and scripting , macOS , Web
19
Translate
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
3 Comments
Advisor ,
Dec 02, 2025 Dec 02, 2025

You can filter layers by name. You could also use a script that walks through layers and renames as needed.

Translate
Report
New Here ,
Dec 02, 2025 Dec 02, 2025

That would be a super helpful feature! A simple find-and-replace tool for layer names would save a ton of time, especially when working with large artboards and multiple assets. It’d make production work much faster and eliminate the need to rename layers one by one.

Translate
Report
Advisor ,
Dec 02, 2025 Dec 02, 2025
LATEST

Just as a sample, this is a script that walks through text layers and renames them based on the text contents. You could write something similar with a window to input your search and replace pairs.

 

/*
Utility Pack Scripts created by David M. Converse ©2018-24

This script renames text layers in an open Photoshop document

Last modifed 7/5/2024

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#target photoshop

renameTextLayers();

function renameTextLayers(){
    if(!app.documents.length > 0){
        return;
        }
    var docRef = null;
    var vis = true;
    var LayerRef = null;
    var TextRef = null;
    var layerText = '';
    try{
        docRef = app.activeDocument;
        docRef.activeLayer = docRef.artLayers[0];
        for(var i = 0; i < docRef.artLayers.length; i++){
            LayerRef = docRef.artLayers[i];
            vis = true;
            if(LayerRef.kind == LayerKind.TEXT){
                if(!LayerRef.visible){
                    vis = false;
                    }
                TextRef = LayerRef.textItem;
                layerText = TextRef.contents;
                layerText = layerText.replace(/\r$/, '');
                layerText = layerText.replace(/,\r/, ', ');
                if(layerText.search('\r') == -1){
                    layerText = layerText.split(' ');
                    layerText[0] = layerText[0].replace(',', '');
                    }
                else{
                    layerText = layerText.split('\r');
                    }
                LayerRef.name = layerText[0];
                if(vis == false){
                    LayerRef.visible = false;
                    }
                }
            }
        }
    catch(e){
        Window.alert(e + e.line);
        }
    }
Translate
Report