No two files can have the same name.
This system has proven itself. Even when used with, e.g. Dropbox, Google Drive, etc.
As a freelancer and employee, I have saved around 4,000 files (one to multi-page documents) using this system over the last 15 years. That corresponds to around 270 documents per year. By far, the largest file in my “box” takes up 122 Megabytes. It is a 372 pages strong PDF file.
As long as you deal with such manageable amounts of documents, which also have a reasonable size, you shouldn’t have any problems with modern file systems.
ext4
file system allows directories to contain up to 4,000,000,000
filesapfs
file system allows directories to contain up to 9,223,372,036,854,775,808
filesntfs
file system allows directories to contain up to 4,294,967,295
filesMy file storage convention should be suitable for families, freelancers, small and medium-sized companies that have a "reasonable" volume of documents. Large companies should work with an extra layer of folder arrangements, for example for years (/box/2024/
) or decades (/box/202*/
).
And now the juicy part. The actual naming convention by which I store my documents.
Each file name may consist of the following pieces of information:
YYYY-MM-DD
.letter
, contract
, certificate
, etc. (predefined).pdf
, .txt
, etc.All parts of a file name are …
-
)DATE
_TYPE
_CREATOR
_RECIPIENT
_DESCRIPTION
.FILE-EXTENSION
For the TYPE, I’m using a small set of predefined values:
letter
contract
certificate
invoice
receipt
offer
coo
manual
article
clippings
diary
document
The RECIPIENT can be optional. If there is no RECIPIENT, leave the RECIPIENT out. For example, there is no RECIPIENT when storing an article from absurdistantimes.com about the US election results.
2024-11-06_article_absurdistan-times.com_us-election-results-2024
The same is true for a diary entry for the same day.
2024-11-06_john-doe_diary.txt
On the other hand, there is almost always a creator/issuer/sender for a document. Do not leave out the CREATOR.
I will only list a few simple examples here.
2020-02-02_contract_gongshow-inc_john-doe_employment-contract.pdf
2024-02-28_letter_ellexis-snoop_john-doe_birthday-card.jpg
For a detailed list with more examples and real files, which you can download, visit the Naming Convention repository on GitHub.
Once you got the files, you can play around with them in your file browser. For example try to …
Ctrl
+F
to search for 2024-05
)Ctrl
+F
to search for diary
)You will see how easy an intuitive it is to identify, sort, filter and find files.
Using the naming convention along with the storage convention has several advantages:
All file systems support up to 255
character file names. The actual length depends on how many bytes a characters takes. There are some multibyte characters in Unicode.
ext4
file system allows file names to contain up to 255
charactersapfs
file system allows file names to contain up to 255
charactersntfs
file system allows file names to contain up to 255
charactersThe longest document name in my ~/Documents/box/
directory is 204
characters long. The second longest is 158
characters long. I have not managed to run into limitations.
When creating file names, be sure to convert the following characters. This will make it easier to search for files on the largest possible number of international keyboards.
Char | Conversion |
---|---|
ä | ae |
ö | oe |
ü | ue |
ß | ss |
ä | ae |
æ | ae |
œ | oe |
ø | oe |
å | aa |
ð | eth |
š | s |
ž | z |
õ | oe |
ë | e |
α | alpha |
$ | dollar |
€ | euro |
Avoid using the following special characters in file names. Apply character conversion or leave them out completely.
Example:
Example | Conversion |
---|---|
ACME, Inc. | acme-inc |
.
perdiod (only use to separate file name and extension),
comma#
pound%
percent{
left curly bracket}
right curly bracket\
back slash<
left angle bracket>
right angle bracket*
asterisk?
question mark/
forward slash$
dollar sign€
euro sign!
exclamation point"
double quotes“
double quotes„
double quotes:
colon@
at sign+
plus sign`
backtick|
pipe=
equal signSources and recommended, further resources on the topic:
License: File naming convention for document filing by Jonas Jared Jacek is licensed under CC BY-SA 4.0.
This license requires that reusers give credit to the creator. It allows reusers to distribute, remix, adapt, and build upon the material in any medium or format, for noncommercial purposes only. To give credit, provide a link back to the original source, the author, and the license e.g. like this:
<p xmlns:cc="http://creativecommons.org/ns#" xmlns:dct="http://purl.org/dc/terms/"><a property="dct:title" rel="cc:attributionURL" href="https://www.ditig.com/publications/naming-convention">File naming convention for document filing</a> by <a rel="cc:attributionURL dct:creator" property="cc:attributionName" href="https://www.j15k.com/">Jonas Jared Jacek</a> is licensed under <a href="https://creativecommons.org/licenses/by-sa/4.0/" target="_blank" rel="license noopener noreferrer">CC BY-SA 4.0</a>.</p>
For more information see the DITig legal page.