extract binary content in stay_open mode

Started by romain, August 30, 2012, 01:27:02 PM

Previous topic - Next topic

romain

Hello,

I'm trying to use the stay open mode to extract binary content.
For example, when I write this in my file :

-if $previewimage
-m
-b
-previewimage
-w /tmp/PreviewImage%c.jpg
/path/to/myfile.jpg
-execute

Exiftool does not write file but extract binary content to stdout.

Is it a bug or a misuse ?

Phil Harvey

This is an easy trap to fall into.  Try this:

-if
$previewimage
-m
-b
-previewimage
-w
/tmp/PreviewImage%c.jpg
/path/to/myfile.jpg
-execute


- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).