Organising Cat Videos using Python

Alfie Torres
2 min readJul 10, 2020

--

After learning Python yesterday, I thought that It would be best to solidify my learning by building something useful. One issue I had over the week involved compiling around 500+ videos for my kittens birthday celebration. After organising the first 10 videos by month, I was already fed up.

Image of one out of a few 500+ videos I have to organise

To my attention, I realised that I could actually make a script in python to go through these videos much faster. Using the GetFileInfo -d yourfile.mov, I realised that I could actually get the unique month and year that the file was created in.

GetFileInfo GUI

Now, comes the part where I have to use Python

Essentially, we have a for each loop going through each file in the downloads directory.

Afterwards, we find the month-year of that file and check if has already been created.

If the new directory has already been created, then all we have to do is move the file.

If it has not been created then we will create a new directory and move the file into that directory.

After running the file, we get the following output (voila). Now you have an organised list of new directories. You can even add new videos in the Downloads directory and run the script again to reorganise the files.

--

--