Layers Batch Renamer
Script for Adobe Photoshop
ㅤ
Description
This is a comprehensive Adobe Photoshop script that allows you to batch rename layers in your documents with advanced customization options. The script provides a user-friendly interface with multiple renaming methods, flexible formatting options, and intelligent placeholders
ㅤ
Key Features
- Rename individual layers or multiple layers at once
- Filter layers with a search function.
- Add number sequences with customizable separators.
- Use find and replace to modify existing names.
- Add prefixes and suffixes to layer names.
- Incorporate dynamic placeholders like date, time, document name.
- Support for layer groups and nested layers.
- Preview changes before applying them.
ㅤ
Installation
1. Download the Layers Batch Renamer.jsx script file.
Place the script in your Photoshop Scripts folder:
⮑ Mac: /Applications/Adobe Photoshop [Version]/Presets/Scripts/
⮑ Windows: C:\Program Files\Adobe\Adobe Photoshop [Version]\Presets\Scripts\
3. Restart Photoshop if it's already running.
4. Access the script via File > Scripts > Layers Batch Renamer
5. The script will open a dialog showing all layers in your current document.
ㅤ

ㅤ
Using the Script
ㅤ
➊ Selecting Layers
The layers list is a central component of the Layers Batch Renamer script that provides a visual representation of all layers in your Photoshop document. It offers several interactive features to help you manage and select layers for renaming. Here's a detailed breakdown of its functionality:
ㅤ
The list shows each layer in a multi-column format:
- Layer Index (# ): Shows the layer's hierarchical index (e.g., "1", "1.1", "1.2")
- Current Name: Displays the layer name with appropriate indentation and icons.
- New Name: Previews the new name that will be applied. The script also shows an arrow (→) indicating that renaming will occur.
ㅤ
Interactive Features
- Updates dynamically when using the search filter.
- Displays layers in a hierarchical tree-like format.
- Shows real-time previews of how layers will be renamed.
- Double-clicking on a layer in the list selects that layer in Photoshop.
ㅤ

ㅤ
1.1 Filter Layers
Use the search box at the top to filter layers by name.
ㅤ
1.2 Select Layers
- Click to select individual layers.
- Ctrl/Cmd + click to select multiple non-contiguous layers.
- Shift + click to select a range of layers.
- Selected layers are highlighted with the system's selection color.
ㅤ
1.3 Browse Layers
Scroll through the list to view all available layers.
ㅤ
1.4 Rename Only Selected Layers
"Rename only selected layers" checkbox limits the preview and renaming to just selected items.
ㅤ
1.5 View Sublayers
"Display layer groups" checkbox toggles the visibility of group folders in the list
- The script uses the "▼" symbol to identify layer groups.
- The script uses the "⮑" symbol to identify sublayers within groups.
ㅤ
The layers list provides a comprehensive overview of your document's structure while enabling precise control over which layers get renamed and how they'll appear after the operation.
ㅤ

ㅤ
Clicking the {…} icon opens a dialog displaying a comprehensive help guide on dynamic placeholders.
ㅤ
This guide provides:
- An overview of placeholders and their purpose.
- Descriptions of each placeholder and its corresponding value.
- Instructions on using placeholders for renaming layers.
- Examples demonstrating placeholder usage.
ㅤ
ㅤ
➋ Renaming Options
The Renaming Options panel is the control center of the Layers Batch Renamer script, containing multiple tools and settings for customizing how your layers will be renamed. This panel is organized into several functional sections, each providing different ways to transform layer names. Here's a detailed breakdown of its functionality:

2.1 Enter Name Field
- The primary input for specifying a new base name for selected layers.
- Accepts plain text and placeholder tokens.
- Can replace the entire layer name or be combined with other options.
- If left empty, the original layer name will be preserved and only modified by other enabled options.
ㅤ
2.2 Number Sequence Options
Add number sequence checkbox:
- When checked, automatically adds sequential numbers to layer names.
- Enables related controls for customizing the sequence.
Reverse order toggle (↕):
- Changes the direction of numbering.
- When enabled, counts from highest to lowest instead of lowest to highest.
- Useful for maintaining proper stacking order in certain workflows.
Separator input:
- Defines the character(s) that separate the layer name from the number.
- Default is a hyphen ("-").
- Can be customized to any character or string (space, underscore, period, etc.).
Base index input:
- Sets the starting number for the sequence (default is 1).
- Can be adjusted using the input field or arrow keys.
ㅤ
2.3 Prefix and Suffix Options
Prefix field:
- Adds specified text to the beginning of layer names.
- Accepts plain text and placeholder tokens.
- Applied before any other naming changes.
ㅤ
Suffix field:
- Adds specified text to the end of layer names.
- Accepts plain text and placeholder tokens.
- Applied after the main name transformation.
ㅤ
2.4 Find and Replace Options
Find field:
- Specifies text to search for within existing layer names.
- Supports case-sensitive matching.
- Searches all occurrences within a name.
ㅤ
Replace field:
- Specifies the text that will replace found instances.
- Accepts plain text and placeholder tokens.
- Can be left empty to remove the found text.
ㅤ
ㅤ
➌ Using Placeholders
The placeholders in the Layers Batch Renamer script are dynamic tokens that can be inserted into any text field to create intelligent, context-aware layer naming systems. These placeholders are automatically replaced with specific values when the renaming is applied.
ㅤ
Available Placeholders
{n} - Original Layer Name
- Inserts the original name of the layer.
- Useful for preserving parts of existing names while adding additional information.
- Example: "Button_{n}" would turn "Close" into "Button_Close".
ㅤ
{d} - Current Date
- Inserts the current date in YYYY-MM-DD format.
- Useful for versioning or tracking when layers were created/modified.
- Example: "Logo_{d}" might become "Logo_2025-03-04".
ㅤ
{t} - Current Time
- Inserts the current time in HH:MM format.
- Useful for more precise timestamping.
- Example: "Draft_{t}" might become "Draft_14:30"
ㅤ
{fn} - Document Filename
- Inserts the name of the current Photoshop document.
- Useful for maintaining consistency between layer names and the file they belong to.
- Example: "Asset_from_{fn}" might become "Asset_from_Project_Mockup.ai".
ㅤ
{i} - Index Number (position in sequence)
- Inserts the position number of the layer in the sequence.
- Different from the number sequence feature as it's embedded within text.
- Example: "Section_{i}_Header" might become "Section_3_Header".
ㅤ
{ir} - Reversed Index Number
- Inserts the position number of the layer in the sequence.
- Different from the number sequence feature as it's embedded within text.
- Example: Bottommost layer in the layer's stack will be 1.
ㅤ
{p} - Full Layer Path (hierarchy)
- Inserts the complete hierarchical path of the layer.
- Includes all parent layers separated by ">" symbols.
- Example: "{p}_Element" might become "Main Content > Navigation > Element".
ㅤ
Placeholder Guide:
- Accessible via the "{...}" button in the interface.
- Provides detailed explanation of each placeholder with examples.
- Shows sample outputs for different placeholder combinations.
ㅤ
ㅤ
➍ Applying Changes
ㅤ
Previewing Changes
- As you configure renaming options, the list will update to show a preview of new names.
- The arrow (→) indicates which layers will be renamed.
- If "Rename only selected layers" is checked, only selected layers will show preview names.
ㅤ
Applying Changes
- Review the preview to ensure the changes look correct.
- Click the "Rename" button to apply all changes.
- A confirmation dialog will display the number of layers successfully renamed.
ㅤ
Additional Features
- Instant Updating: Any change to any field immediately updates the preview in the layers list.
- Help Tips: Hover over any control to see a tooltip explaining its function.
- Resizable Dialog: Click and drag the window’s edges to resize it.
- Documentation: Click the icon in the bottom right corner for the full user guide.
ㅤ
ㅤ
☻ Final Notes
The Layers Batch Renamer script transforms how you manage layers in Adobe Photoshop by providing a comprehensive solution for renaming layers with precision and efficiency. Whether you're organizing complex designs, preparing files for handoff, or simply maintaining consistent naming conventions, this tool streamlines your workflow.
With its intuitive interface, you can easily select and filter layers, preview changes in real-time, and apply sophisticated naming patterns using dynamic placeholders and sequential numbering. The script respects Photoshop's layer structure, allowing you to work with both individual layers and layer groups while maintaining their hierarchical relationships.
Start incorporating this powerful tool into your Photoshop workflow today and experience the benefits of organized, consistently named layers in all your design projects.
ㅤ
ㅤ