An intelligent, local file organization system that classifies files by intent — not just file type — using LLMs via Ollama.
"One click → organized system"
- Intent-Aware Classification: Files sorted by real-world purpose (e.g., a
.pdfcould be "College", "Work", or "Personal") - Adaptive Learning: System improves over time by learning from its own decisions
- Preview Before Commit: Dry-run mode shows you exactly what will happen before any files move
- Full Rollback: Undo any organization operation with one click
- Vision Support: Uses Qwen3-VL to understand image content when text extraction isn't enough
- 100% Local: Runs entirely on your machine via Ollama — no API keys, no cloud, no data leaving your system
- Python 3.11+
- Ollama installed and running
# Clone the repo
git clone https://github.com/your-username/File_Sorter.git
cd File_Sorter
# Install dependencies
pip install -r requirements.txt
# Pull the default models
ollama pull qwen3:1.7b
ollama pull qwen3-vl:2b
# Run the app
python main.pySelect a folder → the system scans all files, extracts content (text from PDFs, code from notebooks, etc.)
Each file is classified by the LLM based on its content and filename. The system checks learned patterns first (instant), then falls back to the LLM.
Review all classifications in a table. Override any assignment by clicking the folder dropdown. Exclude files with checkboxes.
One click to move all files into their assigned folders. Full operation log is saved for rollback.
Settings are accessible in the app's Settings panel:
| Setting | Default | Description |
|---|---|---|
| Text Model | qwen3:1.7b |
Ollama model for text classification |
| Vision Model | qwen3-vl:2b |
Ollama model for image understanding |
| Confidence Threshold | 0.70 | Below this → flagged for review |
| Learning Threshold | 0.85 | Above this → pattern auto-learned |
The system continuously improves by:
- Storing high-confidence patterns (keywords, extensions → folders)
- Tracking user corrections and learning from overrides
- Reinforcing patterns that prove accurate over time
Learned patterns are stored in data/memory.json and can be viewed/edited in Settings.
- Preview mode: Always see what will happen before files move
- No overwrites: Colliding filenames are auto-versioned (
file.pdf→file (2).pdf) - Full rollback: Undo any operation from the History panel
- Error-safe: Individual file errors don't stop the batch
File_Sorter/
├── main.py # Entry point
├── core/ # Backend logic
│ ├── scanner.py # Directory scanner
│ ├── extractor.py # Content extraction (PDF, DOCX, code, etc.)
│ ├── classifier.py # LLM classification engine
│ ├── organizer.py # Safe file mover
│ ├── learner.py # Pattern learning system
│ ├── rollback.py # Undo engine
│ └── ollama_client.py # Ollama SDK wrapper
├── ui/ # CustomTkinter GUI
│ ├── app.py # Main window
│ ├── views/ # Scan, Preview, Settings views
│ └── components/ # Reusable UI components
└── data/ # Persistent storage (auto-created)
├── memory.json # Learned patterns
├── history.json # Operation log
└── config.json # User settings
MIT