ExifTool Forum

ExifTool => Newbies => Topic started by: Fulco on May 01, 2016, 06:27:10 PM

Title: Find keyword tags which are not split into separate items
Post by: 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. 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
Title: Re: Find keyword tags which are not split into separate items
Post by: StarGeek on May 01, 2016, 08:27:35 PM
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.
Title: Re: Find keyword tags which are not split into separate items
Post by: Fulco on May 02, 2016, 05:32:02 PM
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.
Title: Re: Find keyword tags which are not split into separate items
Post by: Phil Harvey on May 02, 2016, 06:05:32 PM
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