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 batch renaming features should allow you to replace certain text. It was possible in iView/Expression Media, and Bridge’s renaming dialog box does it with its “string substitution” option. But this 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.

In Lightroom, Computer Says No?

So I began writing my reply saying that I couldn’t adapt Search & Replace to handle file renaming because plugins can’t rename photos. In other words, “Computer says No” (Little Britain, if the reference isn’t clear!). And then the solution suddenly 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!

Dialog

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

 

Do it in Bridge?

Warning: this method removes any stacking, VCs , collections, history steps applied to the files:

  • LR, save the metadata back to the files – Ctrl or Cmd S
  • In Bridge, select the files and use Batch Rename – its String Substitution option is the one you’ll need
  • In LR, synchronize the folder – this will remove the -Edit files and import the renamed versions.