Batch mode 'Warning: Not an integer for IFD0:Orientation'

Started by kghose, August 03, 2013, 10:26:32 AM

Previous topic - Next topic

kghose

Hi everyone,

I'm a big fan of exiftool and have written yet another wrapper around it using Python and Tkinter (http://kghose.github.io/Chhobi2/)

I'm puzzled by something that is not working as expected and I'm hoping some one can kindly help me out.

I'm trying to set the orientation data based on a conditional. When I run exiftool in regular (non batch) mode everything works fine:

(IMG_1977.JPG has an orientation value of 3)

exiftool -Orientation#=1 -if '$Orientation# eq 3' IMG_1977.JPG
    1 image files updated


However, when I try to do this in stay_open mode, I get a funny warning

exiftool -stay_open True -@ -
IMG_1977.JPG
-Orientation#=1 -if '$Orientation# eq 3'
-execute
Warning: Not an integer for IFD0:Orientation
Nothing to do.
{ready}


Thanks in advance for your help.

Phil Harvey

This is a very common mistake.

In the argfile, you should have one argument per line.  And no quotes:

IMG_1977.JPG
-Orientation#=1
-if
$Orientation# eq 3
-execute


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