Links Rename From CSV

Script for Adobe InDesign or Adobe Illustrator
Latest update 4/11/2024, version 1.4

Using a spreadsheet of regular expressions, the script finds and renames placed graphics in a document or documents.

  • Rename links using regular expressions
  • Process one, all open, or a folder of documents
  • Option to ignore letter case
  • User-configurable localization
Links Rename From CSV
Help me keep making new scripts by supporting my work. Click the PayPal button to contribute any amount you choose. Thank you. William Campbell

How-to Video

Before using the script

The script requires a spreadsheet of regular expressions to match, and the replacement for each, saved as Comma Separated Values (CSV format). The spreadsheet must have at least two columns and may contain any number of rows.

Links Rename From CSV data example

The first row is the header, which identifies the contents of each column. In this example, the column headers are Find and Change. When a row’s value under the change column is empty, the value found is replaced with nothing. In other words, the matched text is removed.

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 pattern to find, and which is its replacement, are selected in the script interface.

How to use the script

The interface has two sections: Process and Data File. Set the desired options and click the OK button to begin. A warning is displayed to remind the user that changes will be made to files on disk and there is no way to undo it. Ensure your files have a backup, then click Yes to proceed. The user is notified when processing is complete, or if an error occurs.

Section 1: Process

Active Document — processes the document that is currently open and the top-most window if multiple documents are open.

Open documents — processes every open document.

Folder — processes every document found in the selected folder. Enable the option Include subfolders if desired.

Section 2: 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 patterns to find.

Column change — select the column of replacements.

Ignore letter case — adds the “i” switch to the regular expression, making it case-insensitive.


By default the script language is US English, which does not require further download or configuration. To have the script interface display other languages, choose from the available languages below. Download and copy the .i18n file to the script folder alongside the script. When launched, the script detects the language file and displays interface text in that language. If your language is not listed, download the English file and translate it. The file is plain text formatted as JSON, containing interface text in English, and a second value for its translation, which for the English file is the identical text. Copy the file and rename it to replace “en” with the relevant code for your language, then edit the file to change each line’s second value to the translation in your language. For more detailed instructions of how to edit and install i18n files, see How to Localize Scripts.


Help me keep making new scripts by supporting my work. Click the PayPal button to contribute any amount you choose. Thank you. William Campbell
Links Rename From CSV

Change log: links-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.