Primary menu

Tag Archives: date

I don’t know if it’s a normal situation or it is one of that things that only happens to me: All my photos had lost their original timestamp. So all files have the same date (the date when files were copied from the old hard disk) and it’s a mess when you have gigs of photos from travels, family, events, animals, etc. without its original shoot date.

So I adapted this little script that reads EXIF data from JPGs recursively into folders and sets timestamp on the files accordingly. Easy!

All you need is the exiv2 tool (quickly available on your distro repos) and run this little script: (Remember to chmod it to a+x or 755).

photos_exif.sh

ZSH

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

#!/bin/sh

if[$# -ne 1 ]

then

echo"This script need the base directory as a parameter!"

echo"All JPG files from /base_dir will be timestamped from their EXIF date"