Created
March 25, 2025 13:26
-
-
Save adoyle/794f14cbc001d59ed931d4b08d74a355 to your computer and use it in GitHub Desktop.
Quick hack to fix file timestamps on image files that are exported by Apple Photos.
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
| #/usr/local/bin/bash | |
| # Sets file modification time to the same as the creation time | |
| find . -type f | \ | |
| while read i; \ | |
| do IFS=' ' read -r -a result <<< $(ls -lUTD %Y%m%d%H%M.%S "$i");\ | |
| touch -t ${result[5]} "$i";\ | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment