Where can I find a list of allowed characters in filenames, depending on the operating system?
(e.g. on Linux, the character
: is allowed in filenames, but not on Windows)
This question is related to
You should start with the Wikipedia Filename page. It has a decent-sized table (Comparison of filename limitations), listing the reserved characters for quite a lot of file systems.
It also has a plethora of other information about each file system, including reserved file names such as
CON under MS-DOS. I mention that only because I was bitten by that once when I shortened an include file from
con.h and spent half an hour figuring out why the compiler hung.
Turns out DOS ignored extensions for devices so that
con.h was exactly the same as
con, the input console (meaning, of course, the compiler was waiting for me to type in the header file before it would continue).