Complicated File Renaming in Lightroom

  • 3
  • Question
  • Updated 6 years ago
I have a catalog containing a few thousand images. I have to rename those images but I can’t find a way to do it in Lightroom because the filenames contain text and sequence numbers as in the examples below:

FirstName_LastName_2010-001.dng
FirstName_LastName_2010-001.psd
FirstName_LastName_2010-002.dng
FirstName_LastName_2010-002.psd

I want to change those filenames to:

2010-001_LastName.dng
2010-001_LastName.psd
2010-002_LastName.dng
2010-002_LastName.psd

I can easily do that automatically in another program like “A Better Finder Rename” or even in Bridge. But when I come back to Lightroom, all my photos are of course missing and, since the filenames have changed, Lightroom will not locate “nearby” photos automatically. So I would have to relink every single photo manually, which would be painful!

Anybody have a solution for this?
Photo of Jean Claude Blanchard

Jean Claude Blanchard

  • 7 Posts
  • 0 Reply Likes

Posted 6 years ago

  • 3
Photo of john beardsworth

john beardsworth

  • 998 Posts
  • 219 Reply Likes
Photo of Rob Cole

Rob Cole

  • 4831 Posts
  • 379 Reply Likes
Jean,

Yes - I think renaming must be done in Lightroom (in order to maintain same image standing).

If you can figure out what to use for the search & replace terms using jb's plugin, then it'll work. Otherwise, consider

FileRenamer

Using the default preset, enter

Search For '%a*_(%a*)_(%d*-%d*)'
Replace With '%2_%1'

(without the apostrophes), and check the 'Lua Regex' box.

That assumes no spaces in first-name & last-name. Let me know if you want the "with spaces" version.

R