News:

2023-03-15 Major improvements to the new Geolocation feature

Main Menu

Append text to already existing tag

Started by luvnrocs, March 01, 2017, 02:42:57 PM

Previous topic - Next topic

luvnrocs

I need to take a tag like IPTC:Source, which already contains info from Bridge, and add a string of text to that tag rather than replacing what is already there. I have tried playing with the < + syntax but just can't seem to get it right.

I am running this as a bat file along with other tags:

exiftool -creator="Digitized by MIT Libraries Scanning Lab" -source=", Massachusetts Institute of Technology, Institute Archives and Special Collections, Cambridge, MA" -xmp:subject="MIT" -transmissionreference="2017.005RR" -m -r -ext .TIF -overwrite_original -ext .PDF %1

Phil Harvey

The ExifTool "+=" operation isn't used to append text.  Try this:

exiftool "-iptc:source<${iptc:source} some extra text" FILE

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

luvnrocs

That worked great.

Now I've got another issue. I tried doing the same thing to IPTC:keywords and when I run the bat file I get a "File not found" error

"iptc:keywords<${iptc:keywords}, MIT"

StarGeek

Keywords is a different type of tag.  This is the case where you would want to use +=.  So you would add "-iptc:keywords+=MIT".  You would do this for each keyword you want to add.  See FAQ 17 for more info.

The reason you were getting a file not found error is because you didn't have a dash at the beginning of of your tag operation in your example.  So exiftool was looking for a file named iptc:keywords<${iptc:keywords}, MIT
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

luvnrocs


Phil Harvey

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

luvnrocs