Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Excited for leaning more and more

Federico Bertani federicoB

💭
Excited for leaning more and more
  • Bologna, Italy
View GitHub Profile
@federicoB
federicoB / whatsappExifDateFix.sh
Last active Nov 11, 2020
Bash script for setting exif photo date according to filename. Created for whatsapp images can be easily adjusted for every filename patterns.
View whatsappExifDateFix.sh
#!/bin/bash
set -e #Exit as soon as any line in the bash script fails
imageCounter=0
for filename in *.jpg
do
imageCounter=$((imageCounter+=1))
#extracting info from file name
year="${filename:4:4}"
month="${filename:8:2}"
You can’t perform that action at this time.