Main Menu

Writing IPTC2 tags

Started by Jossie, September 18, 2013, 05:08:32 AM

Previous topic - Next topic

Jossie

Hello,

currently I am trying to set up EXIFtool-GUI to write metadata in the same way photoshop does under "document Information". There tags are written also under "IPTC2". However, if I do something like "-IPTC2:By-Line < XMP-dc:Creator" I get an error message "IPTC2:By-Line" does not exist", although if I look with EXIFtool-GUI at the entries photoshop created, there is an "By-line" under the list for IPTC2.

What do I do wrong?

Many thanks and best wishes

Hermann-Josef
WINDOWS11 64bit

Phil Harvey

Hi Hermann-Josef,

Right.  This isn't documented.  Multiple IPTC records are differentiated when reading, but not when writing.  When writing, ExifTool updates all writable IPTC records with the same information, so if you just specify IPTC:By-Line, all writable IPTC records should be updated.

- 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 ($).

Jossie

Hello Phil,

okay, I'll do that. Thank you very much for the rapid response!

Hermann-Josef
WINDOWS11 64bit

Jossie

Hello Phil,

in the same context (i.e. Photoshop) it seems that I need to have for the location description both tags "LocationCreated..." and "LocationShown...". However, in EXIFtool I can create only one of them. Copying this into the other does not yield any result. I have tried to find something in the documentation, but failed thus far. I am sure you can give me a hint.

Best wishes

Hermann-Josef
WINDOWS11 64bit

Phil Harvey

hi Hermann-Josef,

I'm afraid you'll have to be more specific.  This is how it works for me:

> exiftool a.jpg -locationcreatedcity=this -locationshowncity=that
    1 image files updated

> exiftool a.jpg -xmp:all
XMP Toolkit                     : Image::ExifTool 9.37
Location Created City           : this
Location Shown City             : that

> exiftool a.jpg "-locationcreatedcity<locationshowncity"
    1 image files updated

> exiftool a.jpg -xmp:all
XMP Toolkit                     : Image::ExifTool 9.37
Location Created City           : that
Location Shown City             : that


- 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 ($).

Jossie

Hi Phil,

I use the GUI to create a set of location descriptions: LocationCreatedCity, LocationCreatedProvinceState, etc. Then I wanted to use an args-file to copy these into the other location descriptors like

-XMP-iptcExt:LocationShownProvinceState < -XMP-iptcExt:LocationCreatedProvinceState

which I adopted from the example args-files.

Executing the args-file does not give any errors or warnings, but the LocationShown... is not written, I do not see it if I switsch to "Metadata - all" in the GUI.

Hermann-Josef
WINDOWS11 64bit

Phil Harvey

There shouldn't be a dash after the "<".

- 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 ($).

Jossie

grrrrr, no idea why I had the dash there ...

Sorry for that and many thanks for your fast help!

Hermann-Josef
WINDOWS11 64bit

Jossie

Good evening Phil,

all most done, one more feature turned up:

I have used GUI to set the tag LocationCreatedCity, which contains a dash, which cannot be entered with the GUI. Thus I use an underscore instead and want to replace it with the args file like this:

-LocationCreatedCity <${LocationCreatedCity;tr/_/-/}
-XMP-iptcExt:LocationShownCity < XMP-iptcExt:LocationCreatedCity

However, if I look at LocationShownCity, the underscore is still there. Only if I execute the args-file twice, the replacement works.

Is there a way to get this done in one go?

Many thanks and best wishes

Hermann-Josef
WINDOWS11 64bit

Phil Harvey

Hi Hermann-Josef,

No.  Copying tags always copies the value that exists in the 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 ($).