top of page

Automated File Sorter with Python

Using Python to simplify file organization.

Python is easily recommended as a programming language that is easy to learn, and has a real day-to-day application. One of the big things python is used for is automation. It took me a bit to figure out what to automate, but I found something useful that I encounter often. One of my hobbies is photography. When offloading the SD card onto my computer, I have two file types (because I shoot JPEG and RAW). I typically sort these into two folders, title them "JPEG" and "RAW" respectively, and then cut and paste them into their respective folders. Doing this over and over again made me realize that this is a fantastic thing to automate, and it's not too difficult of a project. I learned the basics of python: including certain libraries, how to use the sys.argv[1] variable to allow Windows to pass the file in automatically, how to "search" for files of a certain type using the glob library, and how to create folders and move files between paths. For such a simple project, I learned quite a bit, and its success made me more interested in python.

bottom of page