Hello, (my English isn't the best, but I will try to explain my problem :P)
I have a folder with many gpx-files and another folder with subfolders. In this subfolders are a lot of images.
Like this:
Tracks
1.gpx
2.gpx
...
Images
Hinweis
.. .jpg
.. .jpg
...
Stoppschild
.. .jpg
...
and so on..
Now I wrote an Batch file:
set ToolPath="..."
set GPSPath="...\Tracks"
set JPGPath="...\Images"
%ToolPath%\exiftool.exe -geosync=+02:00:00 -geotag=%GPSPath%\*.gpx -overwrite_original %JPGPath% *.JPG -r
When I start the Batch file about the command shell, I get the following Error:
D:\...>"..."\exiftool.exe -geosync=+02:00:00 -geotag="...\Tracks"\*.gpx -overwrite_original "...\Images" *.JPG -r
Warning: Error opening GPS file '...\Tracks\*.gpx' in File:Geotag (ValueConvInv)
Warning: [minor] Error reading PreviewImage from file - .../Images/Hinweis/SAM_0714.JPG
Warning: No writable tags set from .../Images/Hinweis/SAM_0714.JPG
Warning: GPS track is empty in File:Geotime (ValueConvInv) - .../Images/Hinweis/SAM_0740.JPG
Warning: No writable tags set from .../Images/Hinweis/SAM_0740.JPG
Warning: GPS track is empty in File:Geotime (ValueConvInv) - .../Images/Stoppschild/DSCF3605.JPG
Warning: No writable tags set from .../Images/Stoppschild/DSCF3605.JPG
Warning: GPS track is empty in File:Geotime (ValueConvInv) - .../Images/Warnschild/DSCF3591.JPG
Warning: No writable tags set from .../Images/Warnschild/DSCF3591.JPG
Warning: GPS track is empty in File:Geotime (ValueConvInv) - .../Images/Weg/SAM_0762.JPG
Warning: No writable tags set from .../Images/Weg/SAM_0762.JPG
5 directories scanned
0 image files updated
5 image files unchanged
When I wrote in the batch file
%ToolPath%\exiftool.exe -geosync=+02:00:00 -geotag=%GPSPath%\1.gpx -overwrite_original %JPGPath% *.JPG -r
I have no problem an the image files are updated.
But now I have many gpx-files..
Can anyone help me? :D
What version of ExifTool are you using? You may have problems with wildcards in the GPS file name if you are using a really old version (7.84 or earlier).
- Phil
I use the version 9.3.4.
So the version isn't the problem.
Ah. I just realized the problem: The -geotag= syntax doesn't work with wildcards. Try this:
%ToolPath%\exiftool.exe -geosync=+02:00:00 -geotag %GPSPath%\*.gpx -overwrite_original %JPGPath% *.JPG -r
The -geotag option is parsed by the application, and wildcards are expanded. But writing the Geotag tag (with -geotag=) passes straight through to the API, which doesn't expand wildcards. Confusing I know. I have added mention of this in the documentation (https://exiftool.org/geotag.html).
- Phil
Thank you Phil :)
Now the batch file works.