This is a small Python script I built as part of my process of relearning programming after being away from coding for a few years. The goal of this project was to get comfortable again with writing basic Python, working with files and folders, and building something that actually solves a real problem.
What the script does is pretty simple: you point it to a folder (like your Downloads folder), and it automatically organizes all the files inside into different categories based on their file extensions. For example, images go into an Images folder, documents go into Documents, unknown files go into Misc, and so on.
Even though it’s a beginner-level project, it helped me rebuild confidence with:
- Python fundamentals
- Using
pathlibandshutil - Working with the file system
- Writing clean and readable code
- Basic automation workflows
- Run the script in a terminal.
- Type or paste the folder path you want to organize.
- The script checks every item in the folder:
- If it's a file, it looks at the extension.
- Pre-existing folders are ignored.
- If the extension matches a category, it moves the file there.
- If it doesn't match anything, it goes into a
Miscfolder.
- If it's a file, it looks at the extension.
- Folders that already exist are left alone.
That’s it — it just sorts everything for you automatically.
Run it with: python organize.py
When prompted, enter something like: C:/Users/YourName/Downloads
After running the script, the folder might look like:
Downloads
- /Images
- /Documents
- /Videos
- /Code
- /Archives
- /Misc
This project is part of a larger relearning journey I’m on, where I’m rebuilding my programming skills and creating new portfolio pieces. Some upgrades I want to add later include:
- Allowing users to customize categories
- Adding a simple GUI version
- Showing a preview of what will be moved before organizing
- An undo/log feature
For now, this script does what I wanted it to do: help me ease back into coding with something practical and clean.