[Originally posted by mixx on 2008-04-12 18:31:41-07]Good evening,
I am ashamed but need to ask this question, as for the life of me I can not figure out what I am doing wrong. I'd like to go through all my files and fix up old images to put in there the FocalLengthin35mmFormat. I wrote a new tag in .exiftool_config that computes that value by multiplying FocalLength with the appropriate number. It is called Foc6. Now I want to do
exiftool "-Foc6>FovalLengthIn35mmFormat" -if '$model eq "DMC-FZ5"' test.jpg
This should work and it does on a single image without the -if part.
It seems that the -if part does not match any image, even though I have thousands of them. I tried all other $models and also $makes and non of them matches. I also tried other operators such as "ne" they do not work either. It seems that I have an -if problem. I also tried running in a shell (and not DOS), that does not help either.
What can be wrong? I run the latest version as a Windows executable.
Thanks for any help, Mixx
[Originally posted by exiftool on 2008-04-12 22:48:15-07]
Hi Mixx,
I'll assume you are using the right quotes for your shell, although
all Windows shells I know would require the double quotes on
the outside. ie. "$model eq 'DMC-FZ5'"
It is possible there are spaces after the model name, which would
break the match for "eq". If this is the problem, searching for a
substring instead will get things working for you. ie.
"$model =~ /DMC-FZ5/"
- Phil
[Originally posted by mixx on 2008-04-13 11:42:21-07]
Phil,
thanks so much, you are right on both counts: it was a mixture of white space and wrong quotes. I must admit, I never realized that quotes should go the opposite in Windows and Unix shells.
I'd think that a hint to that effect in the exiftool application documentation would be very useful for people like me (and I like to think there are a number of us :-)
Thanks again, mate!
Mixx