First, clarification is needed. Are the keywords filled with
Vacation
Sun
Austria
AUT
Wien
Wien, Innere Stadt or is it
Vacation
Sun
AUT (Country-Primary Location Code)
Wien (Province-State)
Wien, Innere Stadt (City)Because you second listing has data that is unlikely to be removed with the commands you're trying.
Quote from: beernoo on January 23, 2020, 03:04:25 PM
I would like the remove the above IPTC address values from the Keywords while keeping any pre-existing Keywords.
See FAQ #17 (https://exiftool.org/faq.html#Q17), the part with the bold face
copying multiple tags to a single list . Your second command is almost correct, (quotes are needed around argument that has a greater/less than symbol) but doesn't take into account the fact that the later commands overrule the previous ones. That's why only
Country-PrimaryLocationName was removed. It overrode all the previous ones.
So what you want to do, as mentioned in the above FAQ, is use this command:
.\exiftool -AddTagsFromFile @ "-keywords-<City" "-keywords-<Sub-location" "-keywords-<Province-State" "-keywords-<Country-PrimaryLocationCode" "-keywords-<Country-PrimaryLocationName" "P:\Path\IMG_9731.JPG"Additionally, because Geosetter is much better with metadata then irfanview is, you should check the
XMP:Subject keywords tag. Anything that Geosetter is writing into
IPTC:Keywords, it is also writing to
XMP:Subject. And because irfanview doesn't have XMP support (even though it was requested nearly 10 years ago (https://irfanview-forum.de/showthread.php?t=6165)), you won't see that data.
QuoteThat works great but Geosetter also extra populates Keywords with all retrieved address elements which is not a desired side effect in my case.
E.g. the below gets copied both in respective IPTC fields and concatenated with pre-existing keywords.
To avoid this, look at this section of Geosetter's Settings
(https://i.imgur.com/Dlw2szJ.png)
@StarGeek: Thank you so much for your answer. The command line worked and the root cause was the GeoSetter "Add/Copy Data Automatically when Editing or Reading". For some reason, I took for granted that setting was about reverse geotagging (automatically retrieving city, country etc and putting them in the corresponding IPTC fields) which off course I wanted. I didn't guess it implied "...to Keywords"; as for the term "Keywords" as header of the table underneath, I suppose it should be "Fields". Thanks for clarifying this!
Quote from: beernoo on February 04, 2020, 03:36:26 AM(automatically retrieving city, country etc and putting them in the corresponding IPTC fields)
I believe that is covered under the "Add Location Info Automatically when Assigning Map Positions" check box in that image, though I haven't double checked that.