Skip to main content
███████╗ ██████╗ ██████╗ ████████╗███████╗██████╗
██╔════╝██╔═══██╗██╔══██╗╚══██╔══╝██╔════╝██╔══██╗
█████╗  ██║   ██║██████╔╝   ██║   █████╗  ██████╔╝
██╔══╝  ██║   ██║██╔══██╗   ██║   ██╔══╝  ██╔══██╗
██║     ╚██████╔╝██║  ██║   ██║   ███████╗██║  ██║
╚═╝      ╚═════╝ ╚═╝  ╚═╝   ╚═╝   ╚══════╝╚═╝  ╚═╝

Organise your Chaos : a CLI tool to sort files by extension or category (list of extensions in by genre), with recursive mode, the choice between copy/move, and a way to run in the background that watches folders in real time and auto-sorts according to the user's needs.

Requirements :

Python 3.7 + (with pip)
macOS / Linux (Windows not supported due to daemon mode)

Installation :

From my github repo :

Run these commands :

    git clone https://github.com/yourusername/filesorter.git
    cd filesorter
    pip install -e .

Or directly with pip :

    pip install panda-filesorter

Usage :

FORMAT :
    filesorter <command> [arguments]

COMMANDS :

    sort <path/to/directory/that/needs/sorting> <category/filetype> <path/to/destinationDirectory> - single-time sorting (if destinationDirectory does not exist it will be created)
    watch <path/to/directory/that/needs/sorting> <category/filetype> <path/to/destinationDirectory> - continuously watch a directory and sort new files
    stop <path/to/watchedDirectory> - stop a background watcher

    HINT : use a command with only the -h flag to get help :

FLAGS :

    --recursive, -r       : Process subfolders (sort command only)
    --copy                : Copy files instead of moving (default is move)
    --background, -bg     : Run watch as background daemon (So you dont need to keep it running)
    --type EXT, -t        : Sort by a single extension (e.g. .png)
    --category CAT, -c    : Sort by predefined category (see table below)


EXAMPLES :
    filesorter sort --help      -> Gets help and format for sort command
    filesorter sort ~/Desktop ~/Documents --type .pdf --copy -> Takes all pdfs in the Desktop folder and copies them to the Documents folder
    filesorter watch ~/Desktop ~/Screenshots --category img --background -> Continuously moves all image files in the Desktop folder into the Screenshots folder in the background

CATEGORIES :
    img : .jpg, .jpeg, .png, .gif, .bmp, .tiff, .webp, .svg, .ico
    doc : .pdf, .docx, .doc, .txt, .md, .rtf, .odt, .tex
    video : .mp4, .mov, .avi, .mkv, .flv, .wmv, .webm
    audio : .mp3, .wav, .flac, .aac, .ogg, .m4a
    archive : .zip, .tar, .gz, .rar, .7z, .bz2, .xz
    code : .py, .js, .html, .css, .cpp, .c, .java, .go, .rs, .php, .rb, .swift, .kt
    spreadsheet : .xlsx, .xls, .csv, .ods
    presentation : .pptx, .ppt, .key, .odp
    executable : .exe, .msi, .app, .deb, .rpm, .sh, .bat
    diskimage : .iso, .img, .dmg
    font : .ttf, .otf, .woff, .woff2
    ebook : .epub, .mobi, .azw, .fb2
    cad : .dwg, .dxf, .stl, .obj
    database : .db, .sqlite, .sql, .mdb
    config : .json, .yaml, .yml, .xml, .toml, .ini, .cfg

Command not found after install?

If you run filesorter and get command not found, the Python scripts directory is not in your PATH.

Fix (macOS / Linux):

  1. Find where Python installs scripts:
    python3 -m site --user-base
    Then add /bin to that path (e.g., /Users/you/Library/Python/3.10/bin)
    

Add this line to your ~/.zshrc or ~/.bashrc:

export PATH="$PATH:/path/to/python/bin"

Reload your shell:

source ~/.zshrc

Or use the module directly:

python3 -m filesorter --help

This Project was created from scratch for the Stardance coding event by Hack Club inc.

Specific flags for commands (again)

filesorter sort <source_dir> <dest_dir> [flags]

Flags specific to sort:

  • --type EXT, -t – sort by a single extension (e.g. .pdf)
  • --category CAT, -c – sort by a predefined category
  • --recursive, -r – process subfolders
  • --copy – copy instead of move (default is move)

watch – continuous monitoring

Flags specific to watch:

  • --type EXT, -t – watch for a single extension
  • --category CAT, -c – watch for a category
  • --copy – copy instead of move
  • --background, -bg, -b – run as a background daemon

stop – stop a background watcher

Summary table

Flag sort watch stop
--type, -t ✅ ✅ ❌
--category, -c ✅ ✅ ❌
--recursive, -r ✅ ❌ ❌
--copy ✅ ✅ ❌
--background, -bg, -b ❌ ✅ ❌

Metadata

Release files for panda-filesorter 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for panda-filesorter 0.3.0
File Size Uploaded Provenance Actions
panda_filesorter-0.3.0.tar.gz 9.7 kB Without provenance Details for panda_filesorter-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for panda-filesorter 0.3.0
File Interpreter ABI Platform Actions
panda_filesorter-0.3.0-py3-none-any.whl Python 3 none any Details for panda_filesorter-0.3.0-py3-none-any.whl

Total release size: 18.4 kB

Release files / panda_filesorter-0.3.0.tar.gz

Download URL panda_filesorter-0.3.0.tar.gz
Size 9.7 kB
Tags Source
SHA-256 checksum
How to use checksums
f9ddfb04a5204ca1f214254e9593ce168c77108514aaf43931d1e971474c8d36
BLAKE2b-256 checksum
How to use checksums
7ce242a362341fe2a39283de392aea7c579dc118262d72693802d9ae574ba14a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.1

Release files / panda_filesorter-0.3.0-py3-none-any.whl

Download URL panda_filesorter-0.3.0-py3-none-any.whl
Size 8.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
344288d1170f9314634494fca5ac9b6fb4e98e14985e294e62bb337d134ae345
BLAKE2b-256 checksum
How to use checksums
44d93e7b3e98c84655eef0756fb8af6578e85bf4c1cf01bff018bb4884ef8936
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.1

Security for panda-filesorter 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page