file - In Windows, why are some characters illegal? -


as of know, windows bans following characters in file names:

* . " / \ [ ] : ; | = ,

linux, , other unix based systems, ban \0 (the null character) , / (the path separator) reasons seem obvious.

why windows have many banned characters?

i've looked, , every answer find variation of "is valid" or "what valid", nothing discussing design decisions caused windows (dos?) team make them illegal.

to take them in order:

  • * prohibited because win32 wildcard character. note unlike linux, wildcards processed api, not shell.

  • . not prohibited (obviously!) although have special semantics when appears @ end of file name, i.e., removed. backwards compatibility fat file systems and/or applications designed them.

  • " kernel wildcard character.

  • the backward slash path separator, , forward slash treated path separator (sometimes) compatibility unix.

  • [ , ] not prohibited.

  • : is used indicate alternate data stream.

  • ; not prohibited.

  • | - i'm not sure one. possibly because of special meaning on command line, although there other characters special meanings not prohibited in file names.

  • = , , not prohibited.

additional prohibited characters not on list:

  • ? win32 wildcard character.

  • <, > kernel wildcard characters.

  • spaces trimmed end of file names in same way periods are.


Popular posts from this blog