Skip to content

Instantly share code, notes, and snippets.

@auermi
auermi / cp_datetime.sh
Last active March 28, 2021 21:08
Copy one file's metadata to another with the same name in the current directory
# Works even if <datetimeoriginal does not exist on certain files
# Check tags of a file
exiftool -g1 -a -s video.MPG
# AVI to MP4
exiftool -TagsFromFile %d%f.AVI "-FileModifyDate" -ext mp4 .
# MPG to MP4
exiftool -TagsFromFile %d%f.MPG "-FileModifyDate" -ext mp4 .