Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🗂️ Adaptive AI File Organizer

An intelligent, local file organization system that classifies files by intent — not just file type — using LLMs via Ollama.

"One click → organized system"

✨ Features

  • Intent-Aware Classification: Files sorted by real-world purpose (e.g., a .pdf could 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

🚀 Quick Start

Prerequisites

  • Python 3.11+
  • Ollama installed and running

Setup

# 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.py

🖥️ How It Works

1. Browse & Scan

Select a folder → the system scans all files, extracts content (text from PDFs, code from notebooks, etc.)

2. AI Classification

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.

3. Preview & Edit

Review all classifications in a table. Override any assignment by clicking the folder dropdown. Exclude files with checkboxes.

4. Organize

One click to move all files into their assigned folders. Full operation log is saved for rollback.

⚙️ Configuration

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

🧠 Learning System

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.

🛡️ Safety

  • Preview mode: Always see what will happen before files move
  • No overwrites: Colliding filenames are auto-versioned (file.pdffile (2).pdf)
  • Full rollback: Undo any operation from the History panel
  • Error-safe: Individual file errors don't stop the batch

📁 Project Structure

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

📄 License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages