A simple Python CLI tool to automatically sort files into directories by type
Project description
catfile
A simple Python script that automatically organizes files in a directory into folders based on their file types.
If a file type is not recognized, it will be placed in the others folder.
Features
- Sorts files into categories such as
application,images,documents,spreadsheets,presentation,audio,video,archives,code - Automatically creates the target folders if they don't exist
- Puts unknown file types into an
othersfolder - Cross-platform support (Linux, macOS, Windows)
Example
Before sorting:
After Sorting :
How to Install
Open terminal and type pip install catfile
How to Use
- Open terminal in the directory you want to sort
- Type
catfile directories(optional) use to determined wich directories you want the script to run. If empty will default into the current directoryflags(optional) use to determine wich directories you want to create. If empty will create all directories
Flags
flags determined wich directories will be created, you can combine multiple flags by typing one flag after the other.
-acreate a directory for applications only-icreate a directory for images only-dcreate a directory for documents only-screate a directory for spreadsheets only-p→ create a directory for Presentations only-au→ create a directory for Audio files only-v→ create a directory for Videos only-ar→ create a directory for Archives / compressed files only-c→ create a directory for Code / source files only
You can combine multiple arguments for example:
catfile Downloads/ -a -c -d
Will sort files in the Downloads directories that match the directories created wich is applicaton, code, and documents
Supported File Types
-
Applications
.exe, .msi, .bat, .cmd, .app, .dmg, .pkg, .bin, .run, .sh, .deb, .rpm, .jar, .apk, .xpi -
Images
.jpg, .jpeg, .png, .gif, .bmp, .tiff, .tif, .webp, .avif, .heif, .heic, .svg, .eps, .ai, .cr2, .cr3, .nef, .arw, .orf, .rw2, .dng -
Documents
.txt, .rtf, .odt, .md, .doc, .docx, .dot, .dotx, .pdf, .epub, .mobi, .azw3 -
Spreadsheets
.xls, .xlsx, .xlsm, .xlsb, .xlt, .xltx, .xltm, .ods, .ots, .csv, .tsv, .numbers -
Presentations
.ppt, .pptx, .pptm, .pot, .potx, .potm, .odp, .otp, .key -
Audio
.mp3, .aac, .ogg, .wma, .m4a, .wav, .flac, .alac, .aiff, .aif, .opus, .amr, .mid, .midi -
Video
.mp4, .m4v, .mov, .avi, .wmv, .flv, .mkv, .webm, .ogv, .3gp, .3g2, .mts, .m2ts, .ts, .vob -
Archives
.zip, .rar, .7z, .tar, .gz, .bz2, .xz, .iso, .img, .dmg, .vhd, .vhdx, .tgz, .tbz2, .lz, .z -
Code
.html, .htm, .css, .js, .mjs, .cjs, .ts, .tsx, .php, .phtml, .rb, .aspx, .cshtml, .py, .pyw, .ipynb, .java, .c, .h, .cpp, .cc, .cxx, .hpp, .hxx, .cs, .go, .rs, .kt, .kts, .swift, .m, .mm, .sh, .bash, .ps1, .pl, .pm, .lua, .r, .R, .m, .jl, .sas, .yml, .yaml, .json, .xml, .toml, .ini, .md
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file catfile-1.0.2.tar.gz.
File metadata
- Download URL: catfile-1.0.2.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ba35463f22a88bfed306671733ceea26cdac4ddf03bbbb5482ae51d082fcf924
|
|
| MD5 |
8a4c279e754cd8a5a6f21cd0542917ba
|
|
| BLAKE2b-256 |
e9275e3d6001c0953426e4ce8ef2e354c8b885adec815dc8e668c9edf3ec2957
|
File details
Details for the file catfile-1.0.2-py3-none-any.whl.
File metadata
- Download URL: catfile-1.0.2-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bfa2bef868139964966b74d54439f6ad611822d3cad7e284b31a4d8f394959c6
|
|
| MD5 |
149ebcc19b0754c378e0db7aedbf22b3
|
|
| BLAKE2b-256 |
c80cbe3e4431dbb861f785b4512c0ad61bc251898b872f502833a9368f113972
|