Hello,
I'd like to take an image with no Date/Time metadata (but the date/time is the filename) and put in the Exif tags for the Date/Time Original and GPS Date Time, all in the same Exiftool command. Is that possible?
Right now I run two commands. The first is:
exiftool -exif:timezoneoffset=-8 -exif:OffsetTimeOriginal="-08:00" -exif:OffsetTime="-08:00" -exif:OffsetTimeDigitized="-08:00" -datetimeoriginal<filename -modifydate<filename -createdate<filename image.jpg
And only then, run my second command:
exiftool -exif:gpstimestamp<${datetimeoriginal}-08:00 -exif:gpsdatestamp<${datetimeoriginal}-08:00 -exif:GPSMapDatum="WGS-84" -exif:GPSVersionID="2.3.0.0" image.jpg
Is there a way to do this in a single command? Thanks for your help!
It may require some reformatting of the file name to write gpsdatestamp and gpstimestamp. This may be done with the advanced formatting feature. Can you provide an example of how the files are named?
- Phil
Thanks for replying on a weekend :)
Filenames are formated: YYYY-MM-DD hh.mm.ss.jpg
I think that this should work, allowing you to combine your two commands into one:
"-gpsdatestamp<${filename;tr/-./::/}-08:00" "-gpstimestamp<${filename;s/.* //;tr/./:/}-08:00"
Unfortunately, GPSDateStamp and GPSTimeStamp aren't as flexible in the formatting that they allow, but the advanced formatting expression can give them what they want.
- Phil
Thanks Phil.
My input is:
exiftool -datetimeoriginal<filename -modifydate<filename -createdate<filename '-gpsdatestamp<${filename;tr/-./::/}-08:00' '-gpstimestamp<${filename;s/.* //;tr/./:/}-08:00' -overwrite_original image.jpg
Where "image.jpg" = my image dragged and dropped from the MacOS finder.
Output is:
-bash: filename: No such file or directory
I'm using MacOS High Sierra (10.13.3) and Exiftool ver. 10.83
You need quotes around arguments containing a '<'.
Ugh. Yes, I do. Thanks Phil!