Adding Location to Title

Started by MrPhil, March 17, 2022, 03:46:24 PM

Previous topic - Next topic

MrPhil

Hi

I am struggling to amend the EXIF for a file.  What I want to do is add the location to the title field.  for example: -

my_title and my_location becomes: my_title - my_location.

I have tried - exiftool '-iptc:title+<$location'  but that is not changing the title.

Can someone tell me what I need to do?

Thanks

Phil

StarGeek

The main use of +< is to add the value of a tag to a list type tag.  This example shows how you would add the Make to Keywords.

In order to append one tag onto another, you would format the command like this
exiftool '-Title<$Title $Location'  file.jpg

One thing to note is that Title is not an IPTC tag.  You will get a Warning: Sorry, iptc:Title doesn't exist or isn't writable response.  Title is an XMP tag.  You might be mixing up IPTC Legacy (IPTC tags) with IPTC Core, which are XMP tags.  Though technically, Title is Dublin Core.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

MrPhil

Hmm, not working for me :-(

I am running this from Lightroom using JF's Run any Command with /usr/local/bin/exiftool '-title<$title $location' '-caption-Abstract<$location' '-gps:all=' '-overwrite_original' '{folder}'

Any ideas?

Phil

StarGeek

I can't really help with running it from something other than the command line.

All I can suggest is make sure that Title and Location actually exist in the file to begin with and double checking with exiftool from the command line.  Make sure the tags your using are the correct names.  What Lightroom calls a tag may not be the same as what exiftool calls a tag (see FAQ #3).  Also, Lightroom may not know that you've updated the metadata and it needs to be reloaded.  Finally, the data may not be in the file but instead in a XMP sidecar, especially if the file is a RAW file type.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

MrPhil

Got it thanks  :)

The tag to update was ObjectName and not title.   Under MacOS' Preview the 'title' it displays under the Inspector's IPTC tag is the value of the "Object Name" tag; and not the Title tag!  Also when I import the file to SquareSpace, it uses ObjectName for the Caption field.

For anyone else who is looking for this, this is what I used when calling from JF's "Run any Command" in a Lightroom export:-

/usr/local/bin/exiftool '-objectname<$title : $location' '-caption-Abstract<$location' '-gps:all=' '-overwrite_original' '{folder}'

Phil

StarGeek

Title/ObjectName and Description/Caption-Abstract are the corresponding names in XMP and IPTC IIM/Legacy.  You can see the IPTC Photo Metadata Standard to find which tags correspond. For (almost) each item there is a XMP Specs entry and an IIM Specs entry.

Exiftool also has arg files that allow conversion between the various specs where possible.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype