Author Topic: Extracting words from within a caption as filenames  (Read 2305 times)

Offline davidmullen

  • Newcomer
  • *
  • Posts: 8
    • View Profile
    • cyberimages.net
Extracting words from within a caption as filenames
« on: November 22, 2021, 01:37:53 PM »
Hi Folks,

I use Photo Mechanic Plus Version 6.0, build 6097 (85d1687). In sports photography, I have to rename images with the surnames of the players involved. For example, lets say David Mullen (Ireland) and Jack Dillon (UK) are depicted in an image. I use the "Object Field" as the filename field and manually type Mullen_Dillon as the filename, but I wonder if there is a way to achieve this through variables or variable substrings. I`ve searched the forum and googled variations of what I want, but no luck.
Any Ideas?

David
Regards,

David

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Extracting words from within a caption as filenames
« Reply #1 on: November 23, 2021, 03:49:59 PM »
David,

I use Photo Mechanic Plus Version 6.0, build 6097 (85d1687). In sports photography, I have to rename images with the surnames of the players involved. For example, lets say David Mullen (Ireland) and Jack Dillon (UK) are depicted in an image. I use the "Object Field" as the filename field and manually type Mullen_Dillon as the filename, but I wonder if there is a way to achieve this through variables or variable substrings. I've searched the forum and googled variations of what I want, but no luck.

While there is Variable Substring Extraction, it would require getting the offset into the caption (and the length of each name) just right.  I doubt it would be any faster than simply using copy and paste.

No other methods come to mind.

-Kirk

Offline davidmullen

  • Newcomer
  • *
  • Posts: 8
    • View Profile
    • cyberimages.net
Re: Extracting words from within a caption as filenames
« Reply #2 on: November 28, 2021, 02:19:47 AM »
Thanks Kirk,

I found a workaround by amending the code replacement file to give me surnames only. Thanks for your help.

David
Regards,

David