I'm trying to copy date/time information from one file to another, and increment the time by 1 second. I can do it successfully by running two commands in a row:
exiftool -tagsFromFile path/to/source.jpg -DateTimeOriginal -ModifyDate -CreateDate -overwrite_original path/to/destination.jpg
exiftool '-DateTimeOriginal+=0:0:1' '-ModifyDate+=0:0:1' '-CreateDate+=0:0:1' -overwrite_original path/to/destination.jpg
Is there a way to achieve the same with a single command? I try this:
exiftool -tagsFromFile path/to/source.jpg '-DateTimeOriginal+=0:0:1' '-ModifyDate+=0:0:1' '-CreateDate+=0:0:1' -overwrite_original path/to/destination.jpg
I get no errors/warnings from exiftool, but the destination file lacks the above 3 tags altogether.
I'm running exiftool 12.30 on macOS 12.3
Thanks!
If you're copying from one file directly onto another, you can use the GlobalTimeShift option (https://exiftool.org//exiftool_pod.html#globalTimeShift-SHIFT).
C:\>exiftool -G1 -a -s -DateTimeOriginal y:\!temp\Test3.jpg
[ExifIFD] DateTimeOriginal : 2022:03:21 12:00:00
C:\>exiftool -P -overwrite_original -GlobalTimeShift 0:0:1 -TagsFromFile y:\!temp\Test3.jpg -DateTimeOriginal y:\!temp\Test4.jpg
1 image files updated
C:\>exiftool -G1 -a -s -DateTimeOriginal y:\!temp\Test4.jpg
[ExifIFD] DateTimeOriginal : 2022:03:21 12:00:01
But if you plan on doing it in batch, you'll have to use two commands. See here (https://exiftool.org/forum/index.php?topic=5621.0).
Thanks a lot, -GlobalTimeShift does the trick for my use case (working with individual files).