ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: Viktor Nemeth on March 15, 2023, 08:08:01 AM

Title: Advanced track-sync via args file?
Post by: Viktor Nemeth on March 15, 2023, 08:08:01 AM
Hello,

In plain English I need to have a selection of track files and a selection of image files synced, however I want the output of the sync to go into a placeholder xmp file rather than "do the write" itself. As you can see there are also options being triggered for timeZone and some API stuff.

I have - at the moment - the following logic in place:

exiftool  -charset utf8 -charset filename=utf8 -charset photoshop=utf8 -charset exif=utf8 -charset iptc=utf8  -geotag="D:\temp3\2023-02-27.gpx"  -geotag="D:\temp3\2023-02-28.gpx" "-geotime<${DateTimeOriginal#}+00:00" -api GeoMaxIntSecs=1800 -api GeoMaxExtSecs=1800 "D:\temp3\_2280104.ORF" "D:\temp3\_2280105.ORF" -v2  -srcfile "C:\Users\nemet\AppData\Roaming\GeoTagNinja\tmpLocFiles\%F.xmp"


The problem is that if the user selects too many gpx files or too many image files the CMD gets too long and once it hits ~8000 chars it would fail because it's a limitation in Windows.
I can replace the image file list with just a foldername and then use some logic further down the line to ignore the image files that the user hasn't selected.

Is there a way to create an args file that does the trick as per above incl the placeholder xmp files and the API calls?

Thank you
Title: Re: Advanced track-sync via args file?
Post by: Phil Harvey on March 15, 2023, 09:24:12 AM
You can use wildcards in the -geotag file name if you want.

Optionally, the following argfile could be used instead of putting all of the arguments on the command line:

-charset
utf8
-charset
filename=utf8
-charset
photoshop=utf8
-charset
exif=utf8
-charset
iptc=utf8
-geotag=D:\temp3\2023-02-27.gpx
-geotag=D:\temp3\2023-02-28.gpx
-geotime<${DateTimeOriginal#}+00:00
-api
GeoMaxIntSecs=1800
-api
GeoMaxExtSecs=1800
D:\temp3\_2280104.ORF
D:\temp3\_2280105.ORF
-v2
-srcfile
C:\Users\nemet\AppData\Roaming\GeoTagNinja\tmpLocFiles\%F.xmp

Is that what you wanted?

- Phil
Title: Re: Advanced track-sync via args file?
Post by: Viktor Nemeth on March 15, 2023, 02:31:53 PM
Yesss - awesome, thank you