
See the finished project: a Python script that sorts a messy folder into tidy subfolders by file type. This is a beginner Python automation project, and you'll see what you'll be able to do by the end.
Download and install Python 3 on Windows, check it works, and run your first line of code. It's a simple, step-by-step Python setup for complete beginners.
Learn what a file path is and how to use Python's pathlib to point your script at a folder, without the backslash mistakes that catch most beginners.
Use a Python for loop to list every file in a folder. Loops are the core of automating repetitive file tasks.
Get each file's extension (.jpg, .pdf, .txt) with Python and turn it into a folder name. You'll also handle files that have no extension.
Build a safe dry run that prints where each file would go without moving anything, and add a yes/no check so nothing moves until you say so.
Set up the practice folder of mixed files and look at the problem we're solving: a cluttered Downloads-style folder.
Create subfolders automatically and move each file into the right one with Python's shutil. You finish with a working file organiser script.
See how an AI assistant can run and adapt your Python file sorter, and how to reuse the script on any folder, like Downloads or Desktop
Is your Downloads or Desktop folder a mess of photos, PDFs, documents and zip files? In this short, hands-on course you'll write a Python script that sorts it all for you, putting every file into a tidy folder for its type, automatically.
This is a beginner Python automation project. You don't need any programming experience. We start by installing Python, then build the script one small step at a time, so you understand every line rather than copying code you can't follow.
What you'll learn:
How file paths work, and how to point Python at the right folder without the usual backslash mistakes
How a for loop goes through every file in a folder
How to read each file's extension (.jpg, .pdf, .txt) and turn it into a folder name, including files with no extension
How to run a safe dry run that shows where every file would go before anything moves
How to add a simple yes check so nothing moves until you confirm it
How to create folders and move files with Python's pathlib module
By the end you'll have a working file organiser you can reuse on any folder, and a real Python project you built yourself.
The course comes with a downloadable workbook for every lecture. It has the key ideas, the exact code, a try-it task, a cheat sheet with the final script, and a troubleshooting page for common errors.
If you want a quick, practical first step into Python that solves a real everyday problem, this course is for you.