Last active
December 21, 2015 03:19
-
-
Save pfaocle/6241640 to your computer and use it in GitHub Desktop.
Use exiftool to fiddle the dates on photos (when I forget to set the date/time correctly on my camera).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
FILE_FORMAT="JPG" | |
# Show dates of all JPG files in current directory, in human readable format. | |
exiftool -d '%r %a, %B %e, %Y' -DateTimeOriginal -S -s -ext $FILE_FORMAT . | |
# Fiddle the dates - some date fields forward. | |
# Format is Y:M:D h:m:s | |
exiftool -F -AllDates+="2:6:0 0" *$FILE_FORMAT | |
# Fiddle the dates - some date fields backward. | |
exiftool -F -AllDates-="0:0:3 0" *$FILE_FORMAT | |
# Remove back-ups created by exiftool. | |
exiftool -delete_original! *$FILEFORMAT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment