Hi Phil,
Great tool by the way and it is exactly what i'm looking for.
Based on sample in I found on exiftool the following command line works great in creating gpx.
exiftool -r -if "$gpsdatetime" -fileOrder gpsdatetime -p gpx.fmt -d %Y-%m-%dT%H:%M:%SZ F:\PHOTOS\iOS\ > out.gpx
I have a collection of 30000 pictures taken from my phone over the span of 5 years. I would like to create a separate track by years or year month combination within the same out.gpx, is it possible? Alternatively is it possible to have a condition on $gpsdatetime which check should the first 4 digits belong to certain year? If so how should the syntax be?
Thanks.
It would be cool if you could use part of the GPSDateTime value in the output file name, but you can't, so you are stuck with a condition as you suggested. For example, all tracks in January 2015 would be:
exiftool -if "$gpsdatetime =~ /^2015:01/" ...
- Phil
Thanks for the syntax, really appreciate your help.
I'd encountered a problem with date in gpx file. Running the command in windows command prompt has no issue but when i put it in a .bat file and double click the file, the date in gpx showed:
<time>m-H:SZ</time>
instead of
<time>2015-06-21T19:50:54Z</time>
Any idea?
exiftool.exe -fileOrder gpsdatetime -p gpx.fmt -d %Y-%m-%dT%H:%M:%SZ C:\Users\Administrator\Pictures\JPG2GPX > Track.gpx
Yes. You must double all "%" characters in a .BAT file. The percent has special meaning in a batch file.
- Phil
Once again thanks for the info.