Using -if option in ARGFILE

Started by Archive, May 12, 2010, 08:54:01 AM

Previous topic - Next topic

Archive

[Originally posted by brjohnson on 2007-03-20 01:06:07-07]

Getting closer to what I want to do.  I have a Windows shortcut with a target that looks like this:
Code:
"C:\Program Files\ExifTool\exiftool(-k -@ 55mm.txt).exe"
And an options file (55mm.txt) with these contents:
Code:
-focallength=55
-focallengthin35mmformat=83
-lens=55mm f/2.8 Micro-Nikkor
-maxaperturevalue=2.8
-if '$focallength le 1'
-ext .nef
-ext .xmp
When I drag a directory name to the shortcut, everything works except the -if option.  The program processes all files, no matter what the starting focallength value.  However, if I create a new shortcut that looks like this:
Code:

"C:\Program Files\ExifTool\exiftool(-k -if '$focallength le 1' -@ 55mm.txt).exe"
it works correctly, only processing the files w/ focallength le 1.  Have I done soemthing wrong in the options file?  Or, is this not supposed to be done this way?  Thanks,
Bruce

Archive

[Originally posted by nickmills on 2007-03-20 10:14:33-07]

Hi Bruce,
I am also having problems with -if called from -@ running from a Dos command line. It either seems to select everything or nothing according to the order in which I place the arguments.
Don't have a solution I'm afraid.
Nick 20070320

Archive

[Originally posted by exiftool on 2007-03-20 11:24:53-07]

The problem with your -if in the argfile is that you must
place only one argument on a line:

Code:
-focallength=55
-focallengthin35mmformat=83
-lens=55mm f/2.8 Micro-Nikkor
-maxaperturevalue=2.8
-if
$focallength le 1
-ext .nef
-ext .xmp

Archive

[Originally posted by brjohnson on 2007-03-21 01:33:12-07]

Ah.  I thought I had one argument on a line.  Didn't know that -if and it's value were separate arguments.  Live and learn.  It's all working now.  Thanks Phil, you're the best.
Code:
Bruce
Code:
Nick,
I'm not sure I can help much unless Phil's explanation helps.  My argfile is exactly as he's re-written it and it does work.  You do have to make sure the value you're testing and the tag are exactly what's in the data file.  I recommend using the -a -s -u options to examine an image file to see what's actually in it and go from there.  Good luck,
Code:
Bruce

Archive

[Originally posted by nickmills on 2007-03-21 21:50:22-07]

Hi Bruce,
You and Phil have given me the clue. I split the -if and the tag over two lines and removed the double quotes which I think are required only in a command line expression and IT WORKED.
Cheers from one happy bunny. Nick.