Last active
March 15, 2023 21:55
-
-
Save TahirJalilov/e3c445c3794d432ce30f5f5c7282cb5a to your computer and use it in GitHub Desktop.
exiftool photo and video renamer with date and time
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
# rename file by creation date | |
exiftool '-filename<CreateDate' -d '%Y%m%d_%H%M%S%%-c.%%le' -r ./ | |
perl-rename -v 's/(\d{4})-(\d{2})-(\d{2}) (\d{2}).(\d{2}).(\d{2})/$1$2$3_$4$5$6/' * | |
# remove IMG or VID prefix | |
perl-rename -v 's/(IMG)_(\d{8})_(\d{6})/$2_$3/' * | |
perl-rename -v 's/(VID)_(\d{8})_(\d{6})/$2_$3/' * |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment