#!/bin/bash

# **************************************************************
#
# This script changes the original image file time by an amount 
# given as a parameter. 
#
# Then the original filename is changed according to the new 
# file time.
#
# Finally the file date is modifyed to reflect the new file time.
#
# This script is licensed under GPL version 2 or any subsequent
# version at your choice.
# Copyright 2014 by Michael N. Steen
#
# Use at your own risk. There is no warrenty for anything at all
# except using space on your harddisk.
#
# Dependency: exiftool.
#
# **************************************************************



exiftool -r -AllDates-=1:00 -if '$model=~"EOS"' ./
rm -f ./*_original		# and for every subdirectory, i.e. ./raw
exiftool -r '-FileName<CreateDate' -d %Y%m%d-%H%M%S_EOS%%c.%%le -if '$model=~"EOS"' ./
exiftool -r '-DateTimeOriginal>FileModifyDate' -if '$model=~"EOS"' ./

