Skip to content

Instantly share code, notes, and snippets.

@willjobs
Created November 26, 2022 22:18
Show Gist options
  • Save willjobs/2536f953c1362655cb504f4f965619da to your computer and use it in GitHub Desktop.
Save willjobs/2536f953c1362655cb504f4f965619da to your computer and use it in GitHub Desktop.
exiftool snippets
#### Rename all images in current directory according to the CreateDate date and time, adding a copy number with leading '-' if the file already exists (%-c), and preserving the original file extension (%e).
# Note the extra '%' necessary to escape the filename codes (%c and %e) in the date format string.
exiftool '-FileName<CreateDate' -d '%Y%m%d %H%M%S%%-c.%%e' .
#### Shift values of CreateDate by 2 years, 9 months and 14 days. 0 hours, minutes and seconds
exiftool "-CreateDate+=2:9:14 0:0:0" -m .
#### View all time info about a given file:
## System:
# FileModifyDate
# FileAccessDate
# FileInodeChangeDate
## IFD0
# ModifyDate
## ExifIFD
# DateTimeOriginal
# Create Date
exiftool -time:all -g1 -a -s myfile.jpg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment