Set File Date from EXIF Header Date

I know I'm going to need to remember this some day:

1
exiftool "-filemodifydate<datetimeoriginal" FILE

This sets the modification (and possibly creation, depending on OS/FS versions) dates of a given photo to the EXIF Date/Time header. So, if you have an EXIF header like this (via jhead output):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
File name    : P1060634.JPG
File size    : 5041027 bytes
File date    : 2013:05:26 12:02:35
Camera make  : Panasonic
Camera model : DMC-ZS7
Date/Time    : 2013:05:24 19:56:14
Resolution   : 4000 x 3000
Orientation  : rotate 90
Flash used   : Yes (auto)
Focal length :  4.1mm  (35mm equivalent: 25mm)
Exposure time: 0.033 s  (1/30)
Aperture     : f/3.3
ISO equiv.   : 400
Whitebalance : Auto
Light Source : Flash
Metering Mode: pattern
Exposure     : program (auto)
GPS Latitude : N 42d 53m  6.41s
GPS Longitude: W 77d 14m 26.93s
JPEG Quality : 97

You can use the above command to set the File date to match the date/time that the photo was taken, rather than when it was copied to the computer. This is super helpful when trying to look through photos from multiple cameras in order by date taken. Even better is to sync up all of the EXIF dates to adjust for different camera settings. For the mac, ShootShifter (free) is fantastic for this.

May 27th, 2013

Comments