r/PythonLearning • • 6d ago

A Python script that keeps today's downloads within reach and sorts older files into category folders automatically.

Post image

A Python script that keeps today's downloads within reach and sorts older files into category folders automatically. Built with Python's standard library and an object-oriented design, the organizer scans a folder at a configurable interval, classifies files by extension, and moves eligible files into subfolders such as Audio, Images, and Documents

Features:

  • Organizes files by extension using a configurable category mapping.

  • Keeps files created today in the main Downloads folder.

  • Skips configured temporary download files, shortcuts, and specific filenames.

  • Generates numbered filenames when a destination is already occupied.

  • Supports a dry run that reports planned moves without creating folders or moving files.

  • Reports scanned, moved, planned, skipped, and failed files.

  • Repeats scans at a configurable interval and supports stopping with Ctrl+C.

  • Scans the top level only; existing subfolders are left untouched.

It's also on my Github .

You can test it in whatever folder you want by giving it the full path of the directory.

2 Upvotes

0 comments sorted by