Skip to content

Instantly share code, notes, and snippets.

View federicoB's full-sized avatar
💭
Excited for leaning more and more

Federico Bertani federicoB

💭
Excited for leaning more and more
View GitHub Profile
@federicoB
federicoB / whatsappExifDateFix.sh
Last active June 4, 2023 13:50
Bash script for setting exif photo date according to filename. Created for whatsapp images can be easily adjusted for every filename patterns.
#!/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}"