Modifying all files in folder with Geotag

Started by Uncrown2235, December 07, 2023, 09:42:55 AM

Previous topic - Next topic

Uncrown2235

Hi,

Apologies, I have spent a while looking at previous posts, and still struggling with this.  I am trying to Geotag (and if possible, also add some other metadata) to some JPG's.

The command line I am using (PS):
.\exiftool.exe -geotag "C:\Users\XXX\Downloads\XXX\copy\track.log" "C:\Users\XXX\Downloads\XXX\copy"


Contents of track.log:

GPSDateTime,GPSLatitude,GPSLongitude,GPSLatitudeRef,GPSLongitudeRef
2023:12:06 12:56:17,52 49 39.12,2 5 10.44,North,West

I am wanting the same data to be applied to all files in the folder.

When I run this, I get the error "Warning: No writable tags set from [filename].  From searching the foroums, I understand this would occur when the file doesn't have a "FileCreateDate" tag, but all have this

FileModifyDate                  : 2023:12:07 13:14:32+00:00
FileAccessDate                  : 2023:12:07 14:42:44+00:00
FileCreateDate                  : 2023:12:07 14:08:07+00:00
ProfileDateTime                 : 1998:02:09 06:49:00

Could someone please assist?  Also - can I add "Image Description" in the same command, or need another?

Thanks

StarGeek

Quote from: Uncrown2235 on December 07, 2023, 09:42:55 AMWhen I run this, I get the error "Warning: No writable tags set from [filename].  From searching the foroums, I understand this would occur when the file doesn't have a "FileCreateDate" tag, but all have this

FileModifyDate                  : 2023:12:07 13:14:32+00:00
FileAccessDate                  : 2023:12:07 14:42:44+00:00
FileCreateDate                  : 2023:12:07 14:08:07+00:00
ProfileDateTime                 : 1998:02:09 06:49:00

When you don't include the a -GeoTime or -GeoSync option, then the -GeoTag option will default to using the DateTimeOriginal tag and the local time zone, not the FileCreateDate tag.  From the docs on the -geotag option
QuoteIf Geotime is not specified, the value is copied from DateTimeOriginal#

Does your track log include a full track or is it just the single line you listed?  If it's just the single line, then the better option would be to directly set all the tags.  For example

exiftool -GPSDateTime="2023:12:06 12:56:17" -GPSLatitude="52 49 39.12" -GPSLongitude="2 5 10.44" -GPSLatitudeRef=North -GPSLongitudeRef=West /path/to/files/

If it is a complete track log, then a "No writable tags set" usually means that the -Geotime hasn't been correctly set.  See Geotag Troubleshooting #2 (No writable tags set).

Run your command again on a single file and add the -v3 option.  You will want to look through the output for lines that look like this
Loaded 1 points from CSV-format GPS track log file 'test.csv'
  GPS track start: 2023:03:16 18:00:00.000 UTC
  GPS track end:   2023:03:16 18:00:00.000 UTC
Writing File:Geotag
======== y:/!temp/Test4.jpg
Setting new values from y:/!temp/Test4.jpg
  Geotime value:   2023:03:16 18:00:00.000 UTC (local timezone is -07:00)

Look at the "Geotime value" listed under the file and make sure it is located between the "GPS track start" and "GPS track end" time stamps.  If it is not then you need to adjust the time.  The most likely situation is that it will be off by your time zone.

You can do this by either using the -GeoSync option, which you would set to the Hours:Minutes:Seconds that needed to be added/subtracted to the file's Geotime.  For example, if you needed to subtract 2 hours from the file's Geotime you would add this to your command
-GeoSync=-2:0:0

Or you could directly set the -GeoTime option to include a date/time tag that either includes a time zone or manually add the time zone.  For example, if your time zone was -05:00, you might be able to use
"-GeoTime<${DateTimeOriginal#}-05:00"

Use this command to view all the date/time tags in the file
exiftool -time:all  -G1 -a -s /path/to/files/

QuoteAlso - can I add "Image Description" in the same command, or need another?

See note #1 under the -TAG[+-^]=[VALUE] option
QuoteMany tag values may be assigned in a single command

All you need to do is add something like this to your command
-ImageDescription="some text"
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

Uncrown2235

That worked perfectly - Thank you for the educating post :)