box.matto.nl
Enjoying Open Source Software

Set filedate on photo according to EXIF

File date and time

On Linux, *BSD and so on, files have a "last modified" date and time.

It is easy to have a sorted view of your photo directory, sorted by date.

Different timestamps

Sometimes, the photo files have a different "last modified" date and time. Perhaps you moved the files to a different directory, or a different computer.

EXIF

The EXIF information is a set of data that your camera or smart phone has put into the JPG file. One of the elements of this set is the actual date and time you made the photo.

So, if we can extract that information we can restore the right date and time for our photo file.

Jhead

Jhead is just the right tool for that.

Issue the following command:

jhead -ft IMG_1234.JPG

where "IMG_1234.JPG" is the name of the photo file which timestamp you want to set.

It is easy to do a whole directory:

jhead -ft *.JPG

So, make sure your camera has the right date and time before the start of the photoshoot and you are good to go :)

Tags:

⇽ Create presentation slides with Groff and mom Build SBCL on FreeBSD ⇾