ExifTool Forum

ExifTool => Newbies => Topic started by: torwalker on July 17, 2013, 05:35:01 AM

Title: Adding to existing data in XMP Keyword
Post by: torwalker on July 17, 2013, 05:35:01 AM
Hi and apologies if this has been covered before. I have data in the XMP:Title field and I want to add some more data to it, i.e. carry out concatenation (it's the filename I want to add, but the precise data is probably unimportant). I can see how to add new keywords and how to update a value in a field but not how to join or concatenate two strings of data together. Is this possible with exifTool and if so how?
Many thanks
Title: Re: Adding to existing data in XMP Keyword
Post by: Phil Harvey on July 17, 2013, 07:32:54 AM
It is done like this:

exiftool "-xmp:title<${xmp:title} some other text" FILE

- Phil
Title: Re: Adding to existing data in XMP Keyword
Post by: torwalker on July 17, 2013, 01:56:30 PM
Hi Phil and thanks for this. When I use your code (and by the way I am using it via geosetter), I get the following error message:
Warning: Error opening file - FILE
Error: File not found - FILE
The geosetter execution string is:
C:\Users\Roger Claxton\AppData\Roaming\GeoSetter\tools\exiftool.exe  -@ "C:\Users\ROGERC~1\AppData\Local\Temp\et0C89BF11.arg" -execute -overwrite_original -P -m  "-xmp:title<${xmp:title} xxx" FILE -common_args "C:\Users\Public\Pictures\Modes\0.jpg"
where 'xxx' is substituted for the 'some other text' in your example.
I am using version 9.3.3 on Windows 8.
Thanks and I am sorry for being a nuisance. Please point me to a manual if need be!!
Title: Re: Adding to existing data in XMP Keyword
Post by: Phil Harvey on July 17, 2013, 02:08:55 PM
Where I wrote "FILE", I meant the name of your actual file.  Try removing this from your command since you already have inserted the file name.

- Phil
Title: Re: Adding to existing data in XMP Keyword
Post by: torwalker on July 22, 2013, 04:06:44 AM
OK Sorry. Now I understand, but I want to insert whatever is the current filename, e.g. when using exiftool in batch mode, so I can't really enter it (and the one shown on the output was generated as a part of the geosetter error message and did not form part of the Title field.
Anyway I played around a bit and found that the following gave me exactly what I need:

-execute "-xmp:title<${xmp:title} $FileName"

or, without the extension, by creating a config file taken from https://exiftool.org/config.html), as follows:

-execute "-xmp:title<${xmp:title} $BaseName"

Many thanks for your help.
Roger