Find keyword tags which are not split into separate items

Started by Fulco, May 01, 2016, 06:27:10 PM

Previous topic - Next topic

Fulco

For some of my video files I used accidentally the argument "-keywords>subject" without -sep option. The keywords are written as a single string. How can I find files with a keyword tag which are not split into separate items? I tried this command, but it didn't work: exiftool -if '$Subject =~/, /i'

Is there a way to find these files?

Thanks in advance,
- Fulco

StarGeek

Quote from: Fulco on May 01, 2016, 06:27:10 PM
For some of my video files I used accidentally the argument "-keywords>subject" without -sep option. The keywords are written as a single string.

Are you sure they're written as a single string?  For an image file, "-Keywords>Subject" doesn't need the sep option and will copy them properly separated.  But I don't think video files have IPTC:Keywords, so I'm not sure what Keywords tag you're copying from and how it might be formatted.

QuoteI tried this command, but it didn't work: exiftool -if '$Subject =~/, /i'
Try
exiftool -sep "##" -if "$subject=~/, /" -subject DIR
That will show you any file that had Subject items that were merged into a single item.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

Fulco

Thanks for your help.

QuoteAre you sure they're written as a single string?

For my image files I use "-Keywords>Subject" without the -sep option and the items are indeed copied separated. But this will not work for mov files: "-quicktime:keywords>xmp:subject". Lightroom will then read the subject items as a single string. When the -sep option is added the keywords will be copied as separated subject items.

Quoteexiftool -sep "##" -if "$subject=~/, /" -subject DIR

I tried this, but it didn't work. Any other suggestions would be appreciated.

Phil Harvey

Just testing for a comma doesn't work because $subject is expanded into a string using the current separator.  But if you also add -sep XX then it should work, because then it won't match the ones that were just expanded into a string.

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