Last active
January 9, 2021 15:03
-
-
Save HadrienPatte/570e7d629c1b97ab4b29f3b6e1488bd2 to your computer and use it in GitHub Desktop.
Sort and names photos
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This script renames and sorts photos and videos based on the time they were taken and the camera model | |
# Requires exif tag 'CreateDate' to be set | |
# Uses exif tag 'Model' if set | |
exiftool '-Directory<${CreateDate}' -d %Y/%m/%d -r -P -progress . | |
exiftool -if '$Model' '-FileName<${CreateDate}_${Model;tr/ /./;tr(/\\?*:,|"<>\0)()d}.%le' -execute -if 'not $Model' '-FileName<${CreateDate}.%le' -common_args -d %Y-%m-%d_%H.%M.%S%%-c -r -P -ext jpg -ext mov -ext mp4 -ext avi -ext wav -ext 3gp -progress . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment