Created
August 16, 2022 19:25
-
-
Save Framartin/a8691461b301b08eb22f88753591c06a to your computer and use it in GitHub Desktop.
Crude script to sort a single folder of photos into year/month subfolders
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
cd my_huge_DCIM_folder | |
for Y in {2017..2019} ; do | |
echo "****** YEAR $Y ******" | |
for M in {01..12} ; do | |
echo "------ Month $M ------" | |
mkdir -p "$Y/$M" | |
mv IMG_${Y}${M}*.jpg "$Y/$M/" | |
mv VID_${Y}${M}*.mp4 "$Y/$M/" | |
mv PANO_${Y}${M}*.jpg "$Y/$M/" | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment