I'm trying to remove keywords based upon the @ feature mentioned in the advanced formatting, but I don't seem to be getting the expected results. I'm getting a single entries with all the remaining entries joined as one.
C:\>exiftool -P -overwrite_original -subject=Test1 -subject=Test2 -Subject=Test3 y:\!temp\Test4.jpg
1 image files updated
C:\>exiftool -G1 -a -s -sep ## -subject -ExifToolVersion y:\!temp\Test4.jpg
[XMP-dc] Subject : Test1##Test2##Test3
[ExifTool] ExifToolVersion : 11.33
C:\>exiftool -P -overwrite_original -sep ## "-subject<${Subject@;$_=undef if m/Test2/}" y:\!temp\Test4.jpg
1 image files updated
C:\>exiftool -G1 -a -s -sep ## -subject -ExifToolVersion y:\!temp\Test4.jpg
[XMP-dc] Subject : Test1, Test3
[ExifTool] ExifToolVersion : 11.33
If I go back to the version where you first mention it (ver 10.87) (https://exiftool.org/forum/index.php/topic,4646.msg46633.html#msg46633), I still get the wrong results, but it seems to work correctly in ver 10.86
C:\>"C:\Programs\UnixUtils\ExifTool\exiftool_10.86.exe" -P -overwrite_original -subject=Test1 -subject=Test2 -Subject=Test3 y:\!temp\Test4.jpg
1 image files updated
C:\>"C:\Programs\UnixUtils\ExifTool\exiftool_10.86.exe" -G1 -a -s -sep ## -subject -ExifToolVersion y:\!temp\Test4.jpg
[XMP-dc] Subject : Test1##Test2##Test3
[ExifTool] ExifToolVersion : 10.86
C:\>"C:\Programs\UnixUtils\ExifTool\exiftool_10.86.exe" -P -overwrite_original -sep ## "-subject<${Subject@;$_=undef if m/Test2/}" y:\!temp\Test4.jpg
1 image files updated
C:\>"C:\Programs\UnixUtils\ExifTool\exiftool_10.86.exe" -G1 -a -s -sep ## -subject -ExifToolVersion y:\!temp\Test4.jpg
[XMP-dc] Subject : Test1##Test3
[ExifTool] ExifToolVersion : 10.86
C:\>"C:\Programs\UnixUtils\ExifTool\exiftool_10.87.exe" -P -overwrite_original -subject=Test1 -subject=Test2 -Subject=Test3 y:\!temp\Test4.jpg
1 image files updated
C:\>"C:\Programs\UnixUtils\ExifTool\exiftool_10.87.exe" -G1 -a -s -sep ## -subject -ExifToolVersion y:\!temp\Test4.jpg
[XMP-dc] Subject : Test1##Test2##Test3
[ExifTool] ExifToolVersion : 10.87
C:\>"C:\Programs\UnixUtils\ExifTool\exiftool_10.87.exe" -P -overwrite_original -sep ## "-subject<${Subject@;$_=undef if m/Test2/}" y:\!temp\Test4.jpg
1 image files updated
C:\>"C:\Programs\UnixUtils\ExifTool\exiftool_10.87.exe" -G1 -a -s -sep ## -subject -ExifToolVersion y:\!temp\Test4.jpg
[XMP-dc] Subject : Test1, Test3
[ExifTool] ExifToolVersion : 10.87
Am I in error in my understanding of what it's supposed to do?
I'll look into this first thing tomorrow.
- Phil
Thanks for this report and for all the details to make this otherwise sort-of-tricky-bug-to-find much easier!
This will be fixed in 11.35.
- Phil
Edit: The problem was that in version 10.54 I had simplified the API List and ListSep options by combining them into a single ListJoin option. Although I provided for backward compatibility of software using the old options, I didn't think about what would happen if software used a mix of old a new options. This came back to bite me when I added some new code in 10.87 to use the ListJoin option in the advanced formatting "@" feature, while the rest of the code still used the older options.
BTW, Your command will work for versions 10.87 to 11.34 if you use -sep ", " instead of -sep ##.
Quote from: Phil Harvey on April 05, 2019, 07:23:54 AM
BTW, Your command will work for versions 10.87 to 11.34 if you use -sep ", " instead of -sep ##.[/i]
Good to know. The problem is that sometimes I have commas in my keywords.