Downloads manager

Perhaps the best lunch-hour-python-project I have seen is that of the downloads folder manager. I originally saw this in a YouTube video of short python projects which unfortunately I haven’t been able to find again to link to here.

I think almost everyone has a messy downloads folder, we download images, pdfs, programs and numerous other things that create a massively long list of items which can make it hard when going back to find things. I usually kept the folder ordered by most recently which worked quite well as a heuristic for what I wanted.

The idea behind the downloads folder manager is that it watches for a file to get downloaded then based on some rules moves it away into one of a set of folders. As it’s a simple python script the whole thing is completely customisable and it’s easy to pick what folders you create.

I am currently using the following script to manage mine:

This sorts the downloaded files into the following categories; images, archives, tabular data, software, media, scripts, office. If the file doesn’t fit into one of these categories then it is left along in the downloads folder. This way I don’t have to add special handling for the in progress download extension chrome adds to the files as they are downloaded.

This really is a good program to start coding with, it’s small and simple while doing something really useful. If you’re thinning of learning to code it’s not a bad script to have a go at.

There are some things I’d like to expand with this. There is no time management, it might be nice for files within the file type folders to have some sub folders for how long ago they were downloaded so that for the folders which will get the most full, like images, I can easily look for things from today, rest of this week, last week, in the last month, older.

Since the file-watcher is running in the background it could move the files as today changes so that the folders are always representative of the dates their names suggest.


Comments

Popular posts from this blog

An exploration in number systems

Structural engineering with cardboard