Created
January 4, 2018 20:36
-
-
Save spidgorny/4dd2a359d927d1a069d6e371707bfca5 to your computer and use it in GitHub Desktop.
move android DCIM photos to the folders corresponding to the month like 2018-01/
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
#!/bin/bash | |
year=2018 | |
for i in `seq -f "%02g" 1 12`; | |
do | |
mask="???_$year$i*"; | |
folder="$year-$i/"; | |
mkdir -p $folder; | |
echo "" | |
echo -e "mv \t $mask \t $folder"; | |
mv $mask $folder; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Moves IMG_20180101_123456.jpg to 2018-01/