Ever spend ages thinking how you are going to convince someone that a certain task is far from easy, and that they should just give up on the idea – and then the solution appears just as you were about to hit the Send button?

You can download the plugin from here. In Trial mode, it can process up to 10 images at a time.

Well, the other night I had an interesting email from someone who has my Search and Replace plug-in for Lightroom:

… I need to remove text (“Scan_”) from the filename for images I scanned 4-5 years ago (and are now in my LR catalog). It appears [Search and Replace] does not work on filenames, only on metadata. Pre-LR catalog I used a utility to do bulk file name changes on folders of files, but that will be a problem with the LR catalog.

I could use the bulk filename changing tool, then delete the LR-cataloged-but-missing-image and then reimport the newly rename files. But it seems risky and I’d lose metadata for the images w/o XMP files.

It’s not at all unreasonable that photographers would want to replace text as part of a batch renaming process. It was possible in iView/Expression Media, and Bridge’s renaming dialog box has a similar “string substitution” feature. But this feature wasn’t yet in Bridge when Lightroom 1.0 was launched, and I suspect Lightroom fell victim to “it’s not in Bridge” thinking. Sadly, this omission has never been rectified.

Anyway, I began writing my reply saying that I couldn’t adapt Search & Replace to handle file renaming because plugins can’t rename photos. You might summarise my response as “Computer says No” (Little Britain, if the reference isn’t clear!). And then, for some unknown reason, the solution revealed itself:

  1. Use Search & Replace’s Transfer command to copy the file name to an unused IPTC field – it must be one such as Headline that Lightroom’s Batch Rename dialog can access
  2. Use Search & Replace to remove “Scan_” from the field
  3. Use Search & Replace to remove the extension from the field
  4. Finally use LR’s Rename Photos command to rename the files using the field in the renaming template

Easy. And a whole lot easier than I ever thought it might be!


Using Search and Replace on an IPTC field, it’s possible to perform more complex renaming than Lightroom’s Batch Rename permits