Move files into subdirectories based on first character of their filename.
For example:
Before:
.
├── apple.txt
├── banana.jpg
├── cherry.pdf
├── 123.doc
└── README.md
After:
.
├── 0-9
│ └── 123.doc
├── a
│ └── apple.txt
├── b
│ └── banana.jpg
├── c
│ └── cherry.pdf
└── r
└── README.md
Dependencies: Python 3
usage: directorysorter.py [-h] [-r] [-x] [-d STARTPATH] [-n MIN_RECUR]
options:
-h, --help show this help message and exit
-r recursive
-x don't squash digits
-d STARTPATH starting path (default PWD)
-n MIN_RECUR minimum # of files to cleanup in recursive