Are Mathematical Operations Supported

Started by kbellis, May 11, 2016, 01:36:32 PM

Previous topic - Next topic

kbellis

I'm just wondering, in my little bat below, is it possible to do a little math too; e.g. (GPSAltitude*3.28083333)?

echo "FileName<tab>Latitude<tab>Longitude<tab>Altitude" > %1\CameraPositions.csv
exiftool -T -r -filename -n -GPSLatitude -GPSLongitude -GPSAltitude D:\Jobs\1604RFJ > CameraPositions.csv


It ain't no thing if Exiftool can't, I just was just curious  :)

Phil, you are a hero of mine! Thank you again and again for making Exiftool

Oh; one other question (now it dawns on me), can this bat above be made simpler without the explicit path; i.e., generic folder drag and drop, when calling for, and only for images?

Thank you very much!

Phil Harvey

You can do this with a user-defined Composite tag.  See the sample config file for examples.

Alternatively, you could use the -p option instead of -T, like this:
-p "$filename<tab>$gpslatitude<tab>$gpslongitude<tab>${gpsaltitude;$_*=3.28083333}"

Use "%*" instead of a fixed directory name to make it drag and drop (but I notice you are already using %1 for the output directory, so you'll have to figure this out).  Add a -ext option for each different file extension you want to process (otherwise all readable files will be processed).

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

kbellis

Okay, thank you Phil. I'll noodle around with this further!