CLI utility to sort directories based on file extensions
Project description
cleandir
Organizes a directory's contents into subdirectories based on file extensions.
Say goodbye to navigating between hundreds of files in your downloads directory!
Installation
pip install cleandir
Usage
Just pass the directory to organize as an argument
cleandir <dir-name>
By default, cleandir organizes files using the following rules:
- audio: flac, mp3, ogg, wav
- documents: docx, pdf, pptx, xlsx
- misc: 7z, deb, exe, rar, zip
- pictures: gif, jpg, png, svg, webp
- videos: mkv, mov, mp4, webm
Extensions outside this rule are ignored
Custom rules can be passed by creating a JSON file directories and list of extensions:
{
"audio": ["mp3", "wav"],
"code": ["py", "c", "js"],
}
cleandir --json-file <json-file> <dir-name>
If duplicates files exists in the created directory, they can be removed by using the --delete-duplicates
flag:
cleandir -d <dir-name>
Available help can be seen through the --help
flag:
cleandir --help
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dircleaner-0.1.0.tar.gz
(9.5 kB
view hashes)
Built Distribution
Close
Hashes for dircleaner-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | de143c26d30f777a9c74a98da55dee69632fe874014864ac652769eb16a0d92b |
|
MD5 | c7513bca524b8875d11293586b286dda |
|
BLAKE2b-256 | 7241f5aebb1860dffd280cf3bf834b1a44273db3a381211e4125d1013c0ca116 |