Using of -if statement

Started by ajaLx, February 27, 2013, 06:43:51 AM

Previous topic - Next topic

ajaLx

Hi,

Recently I bought a Sigma 8-16 for my Pentax K-5.
Great lens but I have to get used to it...


I knew there were some issues with 8mm focus length
luckily i found the exiftool and the solution to this problem.

Still, in Photoshop the lens (name) is not recognised.
Tried to fix this also with exiftool.
Have particular problems with the -if statement; what's the precise syntax?

See my batchfile:

set DngPath="D:\Fotografie\Pentax RAW\20130226\8-16"
exiftool -overwrite_original -focallengthin35mmformat= "-focallength<$copy2:focallength" -if "$focallength# == 0" %DngPath%
exiftool -overwrite_original "-focallengthin35mmformat<focallength35efl#" -if "not $focallengthin35mmformat" %DngPath%
exiftool -overwrite_original -Lens="Sigma 8-16mm F4.5-5.6 DC HSM" -LensType="Sigma 8-16mm F4.5-5.6 DC HSM" -if "$LensId# eq 8 18" %DngPath%

can anyone give me a tip to improve this?
-if -n "$LensId# eq 8 18" ???

What tag names must be modified for a proper recognition in Photoshop (Bridge) ?

Thank you in advance!




Phil Harvey

This is the quoting that is needed:  -if "$lensID# eq '8 18'"

But why are you writing LensType?  This must already be set properly since the Composite LensID tag is derived from this.  Instead, I would have suggested:

exiftool -overwrite_original "-lens<lensid" if "$lensid# eq '8 18'" %DngPath%

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

ajaLx

Hi Phil,

Thank you very much, that's exactly the clue I was looking for.
Both the -if expression and the "-lens<lensid" assign syntax.
It works flawless!

Aloys