ExifTool Forum

ExifTool => Bug Reports / Feature Requests => Topic started by: beatboxer on July 24, 2015, 09:47:05 AM

Title: ID3 - Output text frames on binary condition
Post by: beatboxer on July 24, 2015, 09:47:05 AM
Hi Phil,

I am trying to list MP3 files containing WMP metadata like this

exiftool -filename -if "$Private =~ /WM\/" -b -U -ext mp3 -a -r MyDir .

But in the output all the filenames are concatenated and separated by dots. I can't seem to format the output with -p either.

The -b switch seems to affect the output as well as the conditional code. Can I get normal text output while using binary for the -if condition?

Thanks.
Title: Re: ID3 - Output text frames on binary condition
Post by: Phil Harvey on July 24, 2015, 10:06:19 AM
Tricky.  Unfortunately as you point out the -b option affects the output formatting.

But you can be really sneaky and enable the Binary option at the API level without changing the application output formatting:

exiftool -filename -if "$Private =~ /WM\\/" -api Binary -U -ext mp3 -a -r MyDir .

(note that I have added an extra backslash.  Otherwise you escape the forward slash)

I think this may do what you want.

- Phil
Title: Re: ID3 - Output text frames on binary condition
Post by: beatboxer on March 29, 2016, 01:16:02 AM
Just came back to say this worked beautifully!

A belated thanks Phil  :D