Layers Rename From CSV
Script for Adobe Illustrator or Adobe InDesign
Latest update 8/22/2023, version 1.6
The script reads a spreadsheet of layer names to find, and changes each layer name found to a new layer name.
- Change the name of any number of layers
- Layers not in CSV are untouched
- Save current layer names as CSV to prepare
Before using the script
The script requires a spreadsheet of find/change pairs, saved as Comma Separated Values (CSV format). The spreadsheet must have at least two columns, one for the layer name to find, and another for its new layer name.
The first row is the header, which identifies the contents of each column. In this example, the column headers are Find and Change. Using this data file, the script looks for a layer named “708LTRK_DISCM_P8_22C”, and if found, renames the layer to “720ATL_DISCM_P9_22T”, and so on.
These columns could just as well be labeled “match” and “replace,” or any other desired labels. The precise column labels, or their order, are not important, and there is no harm in extra columns. Which column is the layer to find, and which is the new name, are selected in the script interface.
How to use the script
The interface is divided into two sections: Data file, and Export current layer names.
Data File (CSV)
Delimiter — the character that separates columns of the data file. The default is comma, normal in the United States. Some European countries use semicolon rather than comma. Select the delimiter used in your region of the world.
File — select the CSV data file, then the column drop-down lists (next) are loaded with the columns discovered in the data.
Column find — select the column of layer names to find.
Column change — select the column of new layer names.
Export current layer names
This option is to help users prepare the CSV file the script requires. Click the button File then choose a location and name for the file to export. This produces a CSV file with the first column loaded with the current layer names. The “change” column is empty, ready for new names. Copy the current layer names to other text editing tools to search and replace or use regular expressions to alter the current layer names, then paste the new names into the “change” column. Now the CSV file is ready for the script to run and rename the layers.
Layers Rename From CSV
Change log: layers-rename-from-csv.txt
For help installing scripts, see How to Install and Use Scripts in Adobe Creative Cloud Applications.
IMPORTANT: scripts are developed for the latest Adobe Creative Cloud applications. Many scripts work in CC 2018 and later, even some as far back as CS6, but may not perform as expected, or run at all, when used in versions prior to 2018. Photoshop features Select Subject and Preserve Details 2.0 definitely fail prior to CC 2018 (version 19) as the features do not exist in earlier versions. For best results use the latest versions of Adobe Creative Cloud applications.
IMPORTANT: by downloading any of the scripts on this page you agree that the software is provided without any warranty, express or implied. USE AT YOUR OWN RISK. Always make backups of important data.
IMPORTANT: fees paid for software products are the purchase of a non-exclusive license to use the software product and do not grant the purchaser any degree of ownership of the software code. Author of the intellectual property and copyright holder William Campbell retains 100% ownership of all code used in all software products regardless of the inspiration for the software product design or functionality.