Auto make directories for each month

Projects can come in any shape and form. From stuff for a friend, a screencast for tutorials, a blogisode or photoshoot. It doesn’t matter. They all have a few things in common: They take time to organize, because you have to import your data, process it, export it, archive it all and back it all up.

You’re literally wasting a lot of time doing simple and repetitive tasks. This blog article is to show you how to think outside of the box by using the command line interface (cli) to help you save time by being more efficient. And this one liner is the most simple example I could think of. Plus, I had to do this myself anyway.

Hopefully this little tutorial shows you how to think outside of the box and apply that creativity you have to improve your workflow so you can continue to focus on the content of a project, rather than the setup of a project.

Okay, what are we doing? We simply want to import data from a few devices that I took pictures, timelapses, videos, etc. with. To achieve this I have to have a directory for this year, with all the months inside of it. So I can make a directory for this project inside January, and start the import process.

Instead of wasting time manually creating all the directories one by one, hoping I am not making any typing errors, etc. I just use a small single line of code to do the work for me.

Here it is:

(IFS=';'; set -f; mkdir -- $(locale mon))

The result:


Posted

in

by

Tags: