Hello,
first, many thanks to Phil for the years of work!
Some years ago, Phil helped me with right syntax for exiftool.
Now, I have the next little problem.
I use exiftool to create a csv-file from all pictures into a folder, that contains filename, longitude and latitude.
Here the Code, working very well:
chcp 1252
exiftool -q -q -echo "Filename;GPSLatitude;GPSLongitude" -p "$filename;${gpslatitude;s/(.*) ([NSEW])$/$2$1/};${gpslongitude;s/(.*) ([NSEW])$/$2$1/}" -c "%%d° %%.3f'" "." "\\SERVER-SCHMIDT\SSD-Master\Pilze\Pilze Koordinaten auslesen\*.jpg" Koordinaten_aus_Photos.csv > "\\SERVER-SCHMIDT\SSD-Master\Pilze\Pilze Koordinaten auslesen\Pilze-Koordinaten.csv"
Output is:
Picture-name.jpg N50° 32.821' E12° 3.326'
Now I will change the output coordinate-format.
From N50° 32.821' E12° 3.326' to 50.547017, 12.055433
And here is my problem. I tried format the coordinates -c "%.6f"
New Code:
chcp 1252
exiftool -q -q -echo "Filename;GPSLatitude;GPSLongitude" -p "$filename;${gpslatitude;s/(.*) ([NSEW])$/$2$1/};${gpslongitude;s/(.*) ([NSEW])$/$2$1/}" -c "%.6f" "\\SERVER-SCHMIDT\SSD-Master\Pilze\Pilze Koordinaten auslesen\*.jpg" Koordinaten_aus_Photos.csv > "\\SERVER-SCHMIDT\SSD-Master\Pilze\Pilze Koordinaten auslesen\Pilze-Koordinaten.csv"
But the result is:
Picture-name N.6f E.6f
Please, can you help me to fix the problem?
Thank you very much,
Kind Regards,
Astrophytum
Hello,
well, I found my mistake, here the working code:
chcp 1252
exiftool -q -q -echo "Dateiname;Breitengrad;Längengrad" -p "$filename;${gpslatitude;s/(.*) ([NSEW])$/$2$1/};${gpslongitude;s/(.*) ([NSEW])$/$2$1/}" -c "%%.6f" "\\SERVER-SCHMIDT\SSD-Master\Pilze\Pilze Koordinaten auslesen\*.jpg" Koordinaten_aus_Photos.csv > "\\SERVER-SCHMIDT\SSD-Master\Pilze\Pilze Koordinaten auslesen\Pilze-Koordinaten.csv"
Kind Regards,
Astrophytum
You didn't say you were running from inside a .bat file, but that was the problem. Percent characters are special in a .bat file and need to be doubled in exiftool commands to pass through the .bat file processing. This is FAQ 27 (https://exiftool.org/faq.html#Q27).
- Phil
Hello Phil,
yes, you are right, I forgot to say I am running this from a batch file. Sorry.
Kind Regards,
Steffen