Created
September 19, 2024 17:25
-
-
Save PythonCoderAS/b4c07f3a99ec9d479029095e0c823eaa to your computer and use it in GitHub Desktop.
Mass rename files exported from Photos.app with created date
This file contains hidden or 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
| for file in huge/*.mov | |
| do | |
| ffprobe -loglevel error -show_entries stream_tags:format_tags -of json $file | jq -r '.format.tags["com.apple.quicktime.creationdate"]' | sed 's/-04:00//g' | sed -E 's/[T:\-]/ /g' | read year month day hour minute second | |
| mv -v $file huge/"Dailies $year-$((month))-$((day)) $((hour))-$((minute))-$((second)).mov" | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment