Medium naming convention
Sjaak Velthoven avatar
Written by Sjaak Velthoven
Updated over a week ago

This article builds upon the simplest naming convention article but can be followed without having read it. There is a follow up article called Advanced naming convention.

In this article you will learn how to limit the acceptable length of a part of a file name.

The following topics will be described in this article:

A001-Filename.extension

Say you have a code for your local files that has the first letter of the project and some number that looks like A001, A002, A003, M001, M002 etc.

To keep your documents section organized you want to make sure that all your files have this code. It does not matter to you that multiple files have the same code as long as they have the code. This can make your documents section more clear and organized so you do not get lost in the massive amounts of files that we generate nowadays.

Initial setup

This is the first step into specifying preference for file naming.

For this example let us therefore try to add a text block to the convention with a length of 4.

Now let us assign the convention to a folder and try to upload a file with the name text.txt to see what happens.

As you can see we get an error and are not able to upload our file. Of course this is because I forgot to tell you to add a code to the file name.... Silly me.

Changing the file name to fit the convention

If you are ever wondering what block is missing you can look at the preview next to naming convention in gray. You now have two ways to change the name of your file so it can successfully be uploaded. Either you can change your file name locally or you can edit the name in the upload dialogue. Change the name to A0001-test.txt and you will see that OH?!

Once more, the file did not get accepted, you were told to add one too many zeros to the code of your file! Not to worry, the naming convention will tell you which block there is a problem with and how long your code is expected to be. Now change the name of the file to A001-test.txt and you will see that the file will be accepted.

Separator

Be sure to use a dash ( - ) between the two blocks as this is what was chosen as a separator. You can now upload your file.

To continue learning about naming conventions check out the following article:

Did this answer your question?