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.
Excellent idea. Adding Tomaxxi’s script to my “epub” folder in my scripts folder.
I am unable to imagine any workflow where I’d want to use a naming convention that starts with “oph#,” … what is that about?
@Anne-Marie
toolset’s growing. And you wouldn’t believe it … but the naming convention I used in the example above… was actually taken from a real job I’ve been working on
Just so you know there are a link renaming scripts that can operate on batches — so you should not have to click-run, click-run, click-run. You can just run once.
Frankly there are so many different link renaming scripts that I cannot keep track of all of them. But one of them can be found as Batch renaming and relinking in InDesign CS4: http://forums.adobe.com/message/2624301.
@John
Thanks heaps for that link 

and Tomaxxi’s script did the job for me (although I’d love to see some improvements to that
that automate things further as well … e.g. automatic jumping to ‘next-image’ etc.)
I’d definitely prefer a batch rename over a manual rename
For the project I was working on, I had to rename the images with a more meaningful name. E.g. “1234-123.jpg” to ‘typewriter.jpg”
I’ll add your link to the bottom of the blog-post so those people that don’t read the comments will see there are other options as well
This is an amazing tool for me! This one is going into my “Favorites” scripts folder – Once again, this circle of experts has given me another step forward in my job performance and growth. Thanks for sharing -
Hi Kathlene, glad Tomaxxi’s script is helpful for you too.
The script is AMAZING!! It works perfectly!!
Glad you like it Jeff. Marijan’s done a great job on it.