-n -tagsFromFile @ -RelativeAltitude+=2
-n -tagsFromFile @ -AbsoluteAltitude+=2
both add 2m to the field
what is the syntax to add them together
-n -tagsFromFile @ -AbsoluteAltitude+=-RelativeAltitude
gives
Warning: Shift value for XMP-drone-dji:AbsoluteAltitude is not a number
I won't go into the dozen alternative attempts that didn't work!@#
Thanks
Try
exiftool -TagsFromFile @ "-AbsoluteAltitude<${AbsoluteAltitude;$_-=$self->GetValue('RelativeAltitude')}" /path/to/files/
Example
C:\>exiftool -g1 -a -s -*Altitude y:\!temp\Test4.jpg
---- XMP-drone-dji ----
AbsoluteAltitude : 30
RelativeAltitude : 20
C:\>exiftool -P -overwrite_original -TagsFromFile @ "-AbsoluteAltitude<${AbsoluteAltitude;$_-=$self->GetValue('RelativeAltitude')}" y:\!temp\Test4.jpg
1 image files updated
C:\>exiftool -g1 -a -s -*Altitude y:\!temp\Test4.jpg
---- XMP-drone-dji ----
AbsoluteAltitude : 10
RelativeAltitude : 20
The name of the tag in the GetValue function is case sensitive and must be the exact name.
Thanks !