: bharatvaj/scripts

1 
2 
3 
4 
5 
6 
7 
8 
9 
10 
11 
12 
13 
#!/bin/sh

if [ $# -eq 0 ]; then
    echo "Usage: exif-update-time.sh [YY:MM to update]"
    exit 1
fi

date_to_update="$1"

for i in *; do
    component="$(exiftool.exe -d "%d %H:%M:%S" -DateTimeOriginal -s3 "$i")";
    exiftool.exe "-AllDates=${date_to_update}:${component}" "$i";
done