Hello again,
-Keywords returns a comma separated list. How can I tell if it's a list or just one value of comma separated strings?
After posting, I found this:
https://exiftool.org/struct.html
I have some homework to do.
Quote from: dwlott on January 15, 2024, 11:04:03 PM-Keywords returns a comma separated list. How can I tell if it's a list or just one value of comma separated strings?
This works great.
-struct
-f
-T
-Directory
-FileName
-Keywords
e:\mySourceFolder
I use the -sep option (https://exiftool.org/exiftool_pod.html#sep-STR--separator).
C:\>exiftool -G1 -a -s -Subject y:\!temp\Test4.jpg
[XMP-dc] Subject : This, is, a, list, This, is, not, a, list
C:\>exiftool -G1 -a -s -sep ## -Subject y:\!temp\Test4.jpg
[XMP-dc] Subject : This##is##a##list##This, is, not, a, list
I use -sep '//' (GraphicConverter uses , and ; as a separator when writing so I use // in exiftool to check what is the actual separator) or -v (the separated list tags should then be on separate lines):
exiftool -a -G1 -s -sep '//' -Keywords -Subject image.jpg
[IPTC] Keywords : Harvey, Phil//Marley, Bob
[XMP-dc] Subject : Harvey, Phil//Marley, Bob
exiftool -a -G1 -s -v image.jpg
| + [IPTC directory, 85 bytes]
| | Keywords = Harvey, Phil
| | Keywords = Marley, Bob
+ [XMP directory, 3105 bytes]
| Subject = Harvey, Phil
| Subject = Marley, Bob
BTW I just noticed that macOS 14.2.1 Sonoma Photos.app forces comma as a separator when importing such image or movie Keywords (on the other hand it accepts semicolon in Keywords). I'd avoid both characters in list type tags.
- Matti
Quote from: wywh on January 16, 2024, 03:36:45 AMBTW I just noticed that macOS 14.2.1 Sonoma Photos.app forces comma as a separator when importing such image or movie Keywords (on the other hand it accepts semicolon in Keywords). I'd avoid both characters in list type tags.
The old Google Picasa software did the same thing. It was really annoying.
Thank you guys for the extra tips. The information saved me time.