{"slug": "file-butler-an-easy-way-to-organize-files-after-downloading", "title": "FILE BUTLER: An easy way to organize files after downloading.", "summary": "A developer built File Butler, a background agent that watches the Downloads folder and automatically sorts, renames, and organizes incoming files. The tool combines Python's watchdog and shutil libraries with Qwen2 0.5B running locally through Ollama, using few-shot prompting and a resilient JSON parser to handle the small model's occasional malformed output. The developer says running the model locally keeps file metadata private, costs nothing per token, and works offline.", "body_md": "*This is a submission for the [Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady](https://dev.to/challenges/hacktoberfest-week3-2026-10-19)*\n\nI built File Butler — a background AI agent that watches your Downloads folder and automatically sorts, renames, and organizes every file that lands there. No more img_9923.jpg, no more document(1).pdf, no more scrolling through 400 unnamed files trying to find that one invoice from last month.\n\nFile organization is one of those tasks everyone puts off. It's boring, repetitive, and feels like a waste of time. File Butler does it for you in the background. You download something, you forget about it, and the Butler handles the rest.\n\nWho gets to be a little lazier because of it? Anyone who has ever thought \"I'll organize my files later\" and never did. Students drowning in lecture slides. Freelancers juggling client files. Anyone who just wants a clean computer without the effort.\n\n**Theme:** Slow and Steady (International Sloth Day)\n\nFile Butler is a background AI agent that rewards laziness. It watches your messy \"Downloads\" folder and automatically sorts, renames, and organizes your files into neat categories.\n\nIt does the work so you don't have to. Drop 50 files, close your laptop, and go to sleep. When you wake up, your computer is clean.\n\n`watchdog` library to monitor the file system for new files.\nThis project relies entirely on **open-source, local AI** (Ollama + Qwen2). Here is why that approach is better than a closed cloud API:\n\nHow I Built It\n\nFile Butler is built around open-weight models running locally via Ollama. Here's the architecture:\n\n```\nFile System Watcher: I used Python's watchdog library to monitor the Downloads folder in real-time. The moment a file is created (downloaded), the agent wakes up.\nLocal AI Brain: The filename and extension are sent to Qwen2 0.5B running through Ollama on my machine. I chose Qwen2 because it's a tiny model (~500MB RAM) that punches way above its weight in structured JSON output — perfect for a low-resource local setup.\nPrompt Engineering: I used few-shot prompting (giving the model examples) to guide the tiny model toward consistent JSON responses. This was critical — small models need patterns to follow.\nRobust Parsing: Since small models can be chatty or make typos (it once returned \"categoory\" instead of \"category\"), I built a resilient parser that hunts for the JSON block within any response and falls back gracefully if parsing fails.\nFile Action: Python's shutil handles the actual moving and renaming, with duplicate-name protection built in.\n```\n\nThe entire stack is Python + Ollama + Qwen2 + Watchdog. No cloud APIs, no external services, no internet required.\n\nRunning my own model locally is what makes File Butler actually viable as a personal tool. Here's why the open-based approach worked better than a closed one:\n\nPrivacy is non-negotiable. File names reveal a lot about you — tax documents, medical records, personal photos, work projects. Sending that metadata to a cloud API means a corporation is processing information about your life. With Ollama and Qwen2, nothing leaves my machine. My Downloads folder stays my business.\n\nZero cost, zero limits. A cloud API charges per token. If I download 100 files a day, that adds up fast. File Butler costs $0.00 to run, 24/7, forever. No rate limits, no credit card, no surprise bills.\n\nTrue ownership and flexibility. If a better open-weights model drops tomorrow, I change one line of code (MODEL_NAME = \"new_model\") and my butler gets smarter. I'm not locked into a vendor's ecosystem, pricing changes, or API deprecations.\n\nIt works offline. I can run this on a laptop with no internet connection — on a plane, in a cabin, anywhere. A cloud API would be useless there.\n\nThe open-source agent harness philosophy. By building on Ollama (open-source) and Qwen2 (open-weights), every piece of this project is transparent, auditable, and modifiable. I know exactly what's happening with my data because I can read the code.", "url": "https://wpnews.pro/news/file-butler-an-easy-way-to-organize-files-after-downloading", "canonical_source": "https://dev.to/heroofmylife/file-butler-an-easy-way-to-organize-files-after-downloading-25p2", "published_at": "2026-10-25 16:06:55+00:00", "updated_at": "2026-10-25 16:13:16.821240+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "large-language-models", "developer-tools"], "entities": ["File Butler", "Ollama", "Qwen2", "watchdog", "Python", "Hacktoberfest"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/file-butler-an-easy-way-to-organize-files-after-downloading", "markdown": "https://wpnews.pro/news/file-butler-an-easy-way-to-organize-files-after-downloading.md", "text": "https://wpnews.pro/news/file-butler-an-easy-way-to-organize-files-after-downloading.txt", "jsonld": "https://wpnews.pro/news/file-butler-an-easy-way-to-organize-files-after-downloading.jsonld"}}