ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: kghose on August 03, 2013, 10:26:32 AM

Title: Batch mode 'Warning: Not an integer for IFD0:Orientation'
Post by: kghose on August 03, 2013, 10:26:32 AM
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.
Title: Re: Batch mode 'Warning: Not an integer for IFD0:Orientation'
Post by: Phil Harvey on August 03, 2013, 07:27:14 PM
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
Title: Re: Batch mode 'Warning: Not an integer for IFD0:Orientation'
Post by: kghose on August 04, 2013, 12:10:30 AM
Thanks so much!