Adding to existing data in XMP Keyword

Started by torwalker, July 17, 2013, 05:35:01 AM

Previous topic - Next topic

torwalker

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

Phil Harvey

It is done like this:

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

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

torwalker

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!!

Phil Harvey

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
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

torwalker

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