File naming guidelines (best practice)

Prepared by Monica Brock 11th January 2005

  • Create file names that are logical, meaningful to all users, simple to read and relevant.
  • Use lowercase when naming files.
  • Do not include spaces.
  • File names should not exceed 31 characters. Total length of file paths should be limited to a maximum of 255 characters. Characters are restricted to letters, numbers and _ (underscore) only.
  • Do not use the following characters: & , . ( ) % # ‘ “ / \ - { } [ ] < > @
  • Always ensure that file extensions are used when saving files using a Macintosh
  • When numbering similar types of files or sequences try to anticipate maximum numbers
  • Files should not be located in directory structures with more than five levels, as this can create difficulties when accessing and archiving files.
Good practice Rationale
Create file names that are logical, meaningful to all users, simple to read and relevant. If a file is named obscurely, it can be almost impossible to locate in the future.
Use lowercase when naming files There are accessibility problems for people with disabilities that might prevent them using the shift key
Do not include spaces This can cause difficulties in most operating systems
File names should not exceed 31 characters. Total length of file paths should be limited to a maximum of 255 characters. Characters are restricted to letters, numbers and _ (underscore) only. More than 31 characters can cause problems for some operating systems. Less is better.Although Windows NTFS partitions support filenames up to 256 characters long, the Mac file system can only support up to 31 characters.
Do not use the following characters:
& , . ( ) % # ‘ “ / \ - { } [ ] < > : ; @
: Directory separator on MacOS
\ Directory separator on Windows V
/ Directory separator on Unix (POSIX) including MacOS X
* Wild card on Unix and Windows
? Wild card character on Windows
\ Escape character on Unix
When numbering similar types of files or sequences try to anticipate maximum numbers If you build in limitations e.g. myfile02.txt then you may have to rename files when the number of files exceed say 99 e.g. myfile187.txt otherwise lists of files will be difficult to order.
Files should not be located in directory paths with more than 6 higher level folders There is an accessibility trade off between the width and depth of directory structures. Best practice is to keep to between 3 - 5 levels.When files are transferred to portable media, burning software such as Nero © is unable to replicate directory structures of more than 6 folders. File and folder names will be shortened by the software and this can lead to naming corruption.

About this entry