Hi,
This tool is absolutely brilliant.
I'm just trying to get to know it better and for that I'm trying to get information from some folders.
I'm using the code below to get some general info and it works great
exiftool -n -directory -filename -CreateDate -ModifyDate -gpslatitude -gpslongitude -csv -r DIR > out.csv
Q1: Can ExifTool retrieve Address info by GPS coordinates (Country, city, street). If it's a stupid question just ignore it :)
Q2: what should I use when I have spaces in my DIR path? I tried " but it does not process the request, I tried ' on the same key as " and it processes forever.
Q3: Can the tool group files into folders by -ModifyDate,-gpslatitude, -gpslongitude (folder format would be yyyy.mm.dd_gpslatitude-gpslongitude ? What would be the code for that
Thanks,
Quote from: dumitrudan608 on March 21, 2021, 07:54:44 PM
Q1: Can ExifTool retrieve Address info by GPS coordinates (Country, city, street). If it's a stupid question just ignore it :)
No, ExifTool doesn't do this. There are ways to do this through Google, but the Google maps API is no longer free.
QuoteQ2: what should I use when I have spaces in my DIR path? I tried " but it does not process the request, I tried ' on the same key as " and it processes forever.
Double quotes around an argument which contains spaces works in all shells that I know. Some shells in GUI OS's allow you to drag and drop the file onto the window instead of typing it if that helps.
QuoteQ3: Can the tool group files into folders by -ModifyDate,-gpslatitude, -gpslongitude (folder format would be yyyy.mm.dd_gpslatitude-gpslongitude ? What would be the code for that
The answer is yes. The command could be something like this (but here the double quotes won't work on Mac, Linux and maybe Windows PowerShell because the "$" sign needs to be escaped differently):
exiftool "-directory<${modifydate}_${gpslatitude}-${gpslongitude}" -c %.6f -d %Y.%m.%d DIR- Phil
Google maps API has $200 free monthly usage. I have used that feature in Virtual Litchi Mission (VLM uses the Google Elevation API to get its elevation information using an API key which is shared between all users. If usage of this key exceeds a certain daily limit then you will need to either wait until the next day when the quota is reset - or else get your own key from Google).
https://cloud.google.com/maps-platform/pricing
https://mavicpilots.com/threads/virtual-litchi-mission.31109/
Quote from: Phil Harvey on March 21, 2021, 09:30:48 PM
Quote from: dumitrudan608 on March 21, 2021, 07:54:44 PM
Q1: Can ExifTool retrieve Address info by GPS coordinates (Country, city, street). If it's a stupid question just ignore it :)
No, ExifTool doesn't do this. There are ways to do this through Google, but the Google maps API is no longer free.
QuoteQ2: what should I use when I have spaces in my DIR path? I tried " but it does not process the request, I tried ' on the same key as " and it processes forever.
Double quotes around an argument which contains spaces works in all shells that I know. Some shells in GUI OS's allow you to drag and drop the file onto the window instead of typing it if that helps.
QuoteQ3: Can the tool group files into folders by -ModifyDate,-gpslatitude, -gpslongitude (folder format would be yyyy.mm.dd_gpslatitude-gpslongitude ? What would be the code for that
The answer is yes. The command could be something like this (but here the double quotes won't work on Mac, Linux and maybe Windows PowerShell because the "$" sign needs to be escaped differently):
exiftool "-directory<${modifydate}_${gpslatitude}-${gpslongitude}" -c %.6f -d %Y.%m.%d DIR
- Phil
Phill you are amazing.
For Q3, the code worked perfectly, just 1 detail, I tried to add -n to change the coordinates to numeric, but it also changed the format of the date to be separated by ":", and that will not work for folder names. Any idea how I could change the coordinates to numeric without affecting the date ?
You can target individual tags with the -n (--printConv) option (https://exiftool.org/exiftool_pod.html#n---printConv) by adding a hashtag to the end of the tag name.
exiftool "-directory<${modifydate}_${gpslatitude#}-${gpslongitude#}" -c %.6f -d %Y.%m.%d DIR
Quote from: dumitrudan608 on March 22, 2021, 06:28:50 PM
Any idea how I could change the coordinates to numeric without affecting the date ?
That is why I used the
-c option.
-c %.6f should give you the coordinates as a decimal number with 6 digits of precision.
- Phil
Ah, I should have seen that. The -c (-coordFormat) option (https://exiftool.org/exiftool_pod.html#c-FMT--coordFormat) rarely pops up as a solution.