Skip to content

Instantly share code, notes, and snippets.

@yoonbae81
Last active July 1, 2020 00:43
Show Gist options
  • Save yoonbae81/8ae102aa461f4d5940746923ea5046ae to your computer and use it in GitHub Desktop.
Save yoonbae81/8ae102aa461f4d5940746923ea5046ae to your computer and use it in GitHub Desktop.
Rename photo and movie files with created date from EXIF
exiftool "-FileName<CreateDate" -d "%Y%m%d %H%M%S.%%e" .
exiftool "-FileModifyDate<FileName" "-FileCreateDate<FileName" "-AllDates<FileName" -overwrite_original -P -r -ext jpg ./
exiftool "-FileModifyDate<FileName" "-FileCreateDate<FileName" "-AllDates<FileName" -overwrite_original -P -r -ext mov ./
exiftool "-FileModifyDate<FileName" "-FileCreateDate<FileName" "-AllDates<FileName" -overwrite_original -P -r -ext mp4 ./
# Regenerate broken movie files
# exiftool -time:all -a -G0:1 -s "20130607 190850.m4v"
# ffmpeg -i "20130607 190850.m4v" -acodec copy -vcodec copy -f mov "20130607 190850.mov"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment