sync keywords between mirrored tree folders structure

Started by SergeS, July 06, 2018, 02:55:00 PM

Previous topic - Next topic

SergeS

Quote from: Phil Harvey on July 23, 2018, 07:34:14 AM
You need to copy the keywords to each of the tags you want (not just "Keywords", but also "XPKeywords" and "Subject" tags, etc).

Can you show some sample how to do it?

Phil Harvey

It depends on exactly what you want to copy where.  I already showed you how to add all Keywords: "-keywords+<keywords"

Assuming the destination tag (DESTTAG) is a list, the general format to add to the list is: "-DESTTAG+<SOURCETAG"

You may add as many of these arguments to the command as you want:

exiftool -tagsfromfile SOURCEFILE "-DESTTAG1+<SOURCETAG1" "-DESTTAG2+<SOURCETAG2" ... FILEorDIR

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

SergeS

Quote from: Phil Harvey on July 23, 2018, 10:06:23 AM
It depends on exactly what you want to copy where.  I already showed you how to add all Keywords: "-keywords+<keywords"

Assuming the destination tag (DESTTAG) is a list, the general format to add to the list is: "-DESTTAG+<SOURCETAG"

You may add as many of these arguments to the command as you want:

exiftool -tagsfromfile SOURCEFILE "-DESTTAG1+<SOURCETAG1" "-DESTTAG2+<SOURCETAG2" ... FILEorDIR

- Phil

Aha, so instead of "keywords" i can use "XPKeywords" or/and "Subject"? :-)
Got it, thank you. I thought "keywords" in a command-line switch with fixed name, I did not realized it is actually tag name.

SergeS

When using "-keywords+<keywords" approach to combine keywords from both files, are there any way to avoid writing of duplicates?
--a option does not help.

Phil Harvey

This is explained in FAQ 17.  Basically, you remove them first before adding them:

"-keywords-<keywords" "-keywords+<keywords"

However, if the keywords may contain duplicates before you start, then it would be a bit more involved.  Hopefully this isn't the case.

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

SergeS

Thank you so much!

p.s. Unbelievable! There is a option for any single wish :-). Thank you again.