ID3 - Output text frames on binary condition

Started by beatboxer, July 24, 2015, 09:47:05 AM

Previous topic - Next topic

beatboxer

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.

Phil Harvey

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

beatboxer

Just came back to say this worked beautifully!

A belated thanks Phil  :D