Author Topic: Changing file name from Lastname_Firstname to Firstname_Lastname  (Read 30 times)

Offline jscowsert

  • Newcomer
  • *
  • Posts: 24
    • View Profile
I need to batch rename a bunch of files from like this: Smith_Joe_450_1234.jpg to Joe_Smith_2025-123.jpg

Is there a way to do this in Find and Replace or Rename Photos? 

I'm using Photo Mechanic Version 6.0, build 7285 (fb3e520), but will upgrade if I need to.

Offline ahoward

  • Camera Bits Staff
  • Uber Member
  • *****
  • Posts: 1211
    • View Profile
Changing "Smith_Joe_" to "Joe_Smith_" should be fairly straightforward using Find and Replace. Just set it to only operate on filenames and enter the appropriate text in the Find and Replace fields

For fixing up the numbers we'll need more info. If you just want to replace every instance of "450" with "2025", then find and replace should make that easy as well. But if you want to do something like "replace the 3 characters at the 10th position in the string" or "trim just the last character from the filename before the extension" you can do that in the Rename window with {filenamebase} variable and Variable substring extraction: https://camerabits.freshdesk.com/support/solutions/articles/48001077381-variable-substring-extraction

That can be tricky, if you have any further questions about using that I'd suggest giving us a call and we'd be happy to walk you through it.