News:

If this site goes down it is because of the crappy DreamHost web hosting: They will disable your "unlimited traffic" web server if a single bot hammers the site with a moderate load.  If necessary, an alternate ExifTool forum page is available at https://sourceforge.net/p/exiftool/discussion/

Main Menu

Find out difference of 2 Tag-list and store the difference in a third Taglist

Started by stb62et, February 02, 2022, 06:30:50 AM

Previous topic - Next topic

stb62et

Hello
I got 2 Tags (string/+) with similar meaning but diffent content.

XMP-acdsee:Keywords: TestAC1, TestAC2, TestAC3, TestP1, TestP2, TestP3
IPTC:Keywords: TestP1,TestAC1, TestP3, TestAC2

Now i want to know Wich Tags are in acdsee:Keywords but not in IPTC:Keywords. Until now i did not find a way to solve this .
Idea was to:
1. Copy Acdsee:Keywords to a third Taglist IPTC:By-line
exiftool IPTC:By-line<=XMP-acdsee:Keywords C:\Users\Stephan\Pictures\EXIFTEST5\IMG_0736.jpg

Tags after copy
C:\Program Files (x86)\exiftool-10.60>exiftool -XMP-acdsee:Keywords -IPTC:Keeywords -IPTC:By-line C:\Users\Stephan\Pictures\EXIFTEST5\IMG_0736.jpg
Keywords                        : TestAC2, TestP2, TestAC1, TestP1, TestP3, TestAC3
By-line                         : Test AC1, Test AC3, Test P1, Test P2

2. than delete the IPTC:Keywords from the IPTC:By-Line
exiftool -IPTC:By-line-=XMP-acdsee:Keywords C:\Users\Stephan\Pictures\EXIFTEST5\IMG_0736.jpg
This command does not change anything
    0 image files updated
    1 image files unchanged

3. The expected Result should be
IPTC:By-line: TestAC3, TestP3

Why is the second command line not working?
Is the approach the right one or do I better use a composite Tag?

thanks for your help
Stephan

Phil Harvey

Hi Stephan,

Quote from: stb62et on February 02, 2022, 06:30:50 AM
2. than delete the IPTC:Keywords from the IPTC:By-Line
exiftool -IPTC:By-line-=XMP-acdsee:Keywords C:\Users\Stephan\Pictures\EXIFTEST5\IMG_0736.jpg

It should be -<, not -= (a-la common mistake 5c).

Your method is simpler than using a Composite tag, but requires more commands.

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

stb62et

Hi Phil
thanks a lot for your very fast help. This tool is more than gorgeous and helps a lot to normalize my tags in the pictures.
Athough i did a mistake in naming the tags your hint was right (as usual) and i apologize for this mistakes as you already have written a FAQ for this.

so to delete the command has to be

exiftool "-IPTC:By-line-<IPTC:Keywords" C:\Users\Stephan\Pictures\EXIFTEST5\IMG_0736.jpg

Is my assumption right that doing this in a composite Tag is performance wise faster than with 2 commands (I want to run this on severall thousands of jpgs┬┤s).

thanks
Stephan

Phil Harvey

Hi Stephan,

Yes, Doing this in a Composite tag should be at least twice as fast, but I don't have time to work up a config file that would do this.

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

stb62et