Skip to content

Instantly share code, notes, and snippets.

@kenchou
Last active March 8, 2023 14:26
Show Gist options
  • Save kenchou/8f7cc14869d7bcb685bf3523c3f952f1 to your computer and use it in GitHub Desktop.
Save kenchou/8f7cc14869d7bcb685bf3523c3f952f1 to your computer and use it in GitHub Desktop.
微信导出图片重设时间戳
# mmexport#############.jpg
# 微信导出的文件抹去了全部 exif 信息
# 文件名后有13个数字, 前十位为时间戳(秒数),后三位可能是毫秒,不需要
exiftool -P -overwrite_original -d "%s" '-DateTimeOriginal<${filename;m/(\d{10})/;$_=$1}' mmexport*.jpg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment