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:
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.
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.
To continue learning about naming conventions check out the following article: