Some time ago Tomaxxi (Marijan Tompa) wrote a small script that allows you to rename images from within InDesign. You might wonder why you’d want to use a script like this? Well, I actually found myself using it this morning as part of an EPUB production process.
I’d received client-supplied print artwork in InDesign, and the Links used in the document contained all sorts of naming conventions. Including the use of special characters. So I decided to perform the big clean-up. I could have used Adobe Bridge’s Batch Rename to convert special characters to underscores etc., but that would have left InDesign displaying a ton of missing links afterwards… What Marijan’s script allowed me to do is rename the images to my liking AND retain the Links in InDesign in one hit. Nice!
Download link: tomaxxiLINKrename.jsx
To install the script:
If you wish to, create a new folder in which you want to organise your scripts (it will appear as such in the Scripts panel).
The installed script will now appear in the Scripts Panel.
Marijan’s instructions for using the script come down to:
Run Script: You run the script by double clicking it in the scripts panel, or selecting Run Script from the Scripts panel menu, or applying an assigned keyboard shortcut.
Be aware: Clicking a link to an image in the Links panel, will select the Content. Unfortunately, running the [1.0] version of the script when the content is selected throws an error. You must have the Container selected. The easiest way to do that is to press the Esc-key on the keyboard.
I found myself working on a document that contained quite a few images that I wanted to rename. So to ensure I didn’t miss any, I used the Links panel to navigate from image to image before executing the script.
So I first of all assigned a keyboard shortcut to the script (Edit > Keyboard Shortcuts… Product Area > Scripts ). Then used the links in the Links panel to select the images in the InDesign document on by one and ran the script to rename.
Process I used:
If you happen to enter a name that’s already used and click Rename, you’ll receive a warning telling you that a file with the intended new name already exists.
In this case you have an option to a) Relink the selected image to that particular file (Click Yes), or b) Cancel the rename action, by clicking No .
If you change your mind… and want to Cancel out of the Rename placed file dialog, press Esc.
Some small improvements I’d suggest:
Batch renaming: John H. in the 4th comments below points out that there are also batch image rename scripts available for InDesign as well. The last script in the InDesign forum posts he mentions, renames all image links in InDesign based on a ‘base-name’ you enter and adds a counter suffix to that name that numbers each image. E.g. you’d end-up with artwork001.jpg, artwork002.jpg etc.
Also If anyone out there has spotted a Batch Rename script for InDesign that a) retains original names, but turns them into web-friendly names (no spaces, special chars), for instance by replacing those chars with ‘underscores’. Let me know. I’d be happy to add some extra info about that script to my blog.