Skip to content

jamespo/directorysorter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

directorysorter

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

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages