changing ctime photo timestamps to the real date

written by juan on February 1st, 2006 @ 12:00 AM

Yesterday i copy a bunch of photos from one computer to another and i lost the creation timestamp (important to sort the photos of several cameras). Lucky me that EXIF has that date...
for i in sur/*;
 do
      ctime=`exif.py "$i" | grep DateTimeOriginal| cut -d= -f2|cut -d@ -f1|sed s/:/\ /g|awk '{print $1$2$3$4$5"."$6}'`
      if [[ "$ctime" != "" ]]; then
              touch -c -t $ctime "$i"
      fi
done
exif.py comes with kde-base/kdeaddons-3.5.0

Comments are closed

Options:

Size

Colors