mirror of
https://github.com/aquatix/dotfiles.git
synced 2025-12-06 21:45:10 +01:00
Extract to real datetime stamp from EXIF info and fix file modification
time
This commit is contained in:
14
bin/fixpictimestamps
Executable file
14
bin/fixpictimestamps
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
find -name '*.jpg' | while read PIC; do
|
||||
DATE=$(exiftool -p '$DateTimeOriginal' $PIC | sed 's/[: ]//g')
|
||||
echo "$DATE $PIC"
|
||||
touch -t $(echo $DATE | sed 's/\(..$\)/\.\1/') $PIC
|
||||
#mv -i $PIC $(dirname $PIC)/$DATE.jpg
|
||||
done
|
||||
|
||||
find -name '*.CR2' | while read PIC; do
|
||||
DATE=$(exiftool -p '$DateTimeOriginal' $PIC | sed 's/[: ]//g')
|
||||
echo "$DATE $PIC"
|
||||
touch -t $(echo $DATE | sed 's/\(..$\)/\.\1/') $PIC
|
||||
#mv -i $PIC $(dirname $PIC)/$DATE.jpg
|
||||
done
|
||||
Reference in New Issue
Block a user