ExifTool Forum

ExifTool => Newbies => Topic started by: twhite on August 30, 2017, 09:32:06 AM

Title: Use only part of the lens name in the new name of an image
Post by: twhite on August 30, 2017, 09:32:06 AM
I would like to include the name of the lens in the image name. LensID tagt gives the full name that is a little too long.
LensID : Tamron AF 16-300mm f/3.5-6.3 Di II VC PZD (B016)

I would like to shorten it only to the text before the 'f/'.
How can I do this?

Thomas
Title: Re: Use only part of the lens name in the new name of an image
Post by: StarGeek on August 30, 2017, 01:18:41 PM
I'm assuming you don't want to include the space in front of the "f/" as well.  If so, you can use this in the spot you want to use LensID:
${LensID;s/ f\/.*$//}
Title: Re: Use only part of the lens name in the new name of an image
Post by: twhite on October 25, 2017, 05:29:10 AM
Thank you very much.