Created
April 29, 2018 07:09
-
-
Save JamesMarino/ca2608b95323c2e1c77e5193e1d4ea8d to your computer and use it in GitHub Desktop.
Google Photos Upload Prep
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
# Change to directory with photos | |
cd /Users/me/photo/upload | |
# Flatten Current Directory (Forces overwrite) | |
find . -mindepth 2 -type f -exec mv -f '{}' . ';' | |
# Delete all folders (Assumes empty) | |
find . -type d -delete | |
# Split into 5000 files per folder | |
i=0; for f in *; do d=2014.1_$(printf %03d $((i/5000+1))); mkdir -p $d; mv "$f" $d; let i++; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment