๐Ÿ“‚ Filenames

November 14, 2019 ยท View on GitHub

File systems

Each OS tends to use its own file system:

Each file system has its own restrictions when it comes to naming files and paths.

Filenames constraints

Cross-platform filenames need to avoid:

  • any other characters but a-z, 0-9, -._,=()
  • starting with -
  • ending with a .
  • starting or ending with ~.
  • uppercase characters (Mac and Windows are case-insensitive).
  • being more than 255 characters long.
  • being one of those names: com1, com2, com3, com4, com5, com6, com7, com8, com9, lpt1, lpt2, lpt3, lpt4, lpt5, lpt6, lpt7, lpt8, lpt9, con, nul, prn, aux.

Paths contraints

Cross-platform file paths need to avoid being more than 260 characters long.

Summary

Only use lowercase a-z, 0-9 and -._,=() in filenames.

Avoid paths longer than 260 characters.


Next (๐Ÿ“‚ Symlinks)
Previous (๐Ÿ“‚ File paths)
Top