
Build a Desktop File Organizer in 35 Lines of Python — Weekend Project
Your Downloads folder is a mess. Mine was too — 400+ files, zero organization. So I spent a Saturday afternoon writing a Python script that watches a folder and auto-sorts files into subfolders by type. 35 lines, no external libraries beyond watchdog, runs forever in the background. Here's the full weekend project. You'll have it running in under 30 minutes. Why Build This? Every developer I know has a chaotic Downloads folder. PDFs from 2019 sitting next to screenshots from yesterday. You could manually sort them — or you could automate it once and never think about it again. This project teaches you: File system operations with os and shutil The watchdog library for real-time file monitoring How to build a script that runs as a background service The Code First, install the only dependency: pip install watchdog Now here's the complete script — file_organizer.py : import os import shutil import time from watchdog.observers import Observer from watchdog.events import FileSystemEventHan
Continue reading on Dev.to
Opens in a new tab



