Cannot create a directory named “Aux” or starting by “Aux.” on Windows 8.1

前端 未结 1 671
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-11 13:42

I just encountered a really weird bug on Windows 8.1.

I can\'t seem to be able to create a folder named Aux or starting by Aux.. I tried on

相关标签:
1条回答
  • 2021-01-11 14:19

    aux, prn, and con (among some others) are reserved for legacy reasons. prn refers to the printer, for instance, and con refers to the standard keyboard (console). It's a remnant of MS-DOS retained for compatibility reasons, I'd guess.

    You can still see con in use at a command prompt: type copy con test.txt in a folder where you have write access, type some text, and hit F6 to commit to disk, and then type test.txt to display what you typed on the screen.

    There's a bunch of information in Naming Files, Paths and Namespaces (Windows) - for the parts that are relevant to your question, see the section with the bullet points, specifically this item:

    • Do not use the following reserved names for the name of a file:

      CON, PRN, AUX, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, and LPT9. Also avoid these names followed immediately by an extension; for example, NUL.txt is not recommended. For more information, see Namespaces.

    0 讨论(0)
提交回复
热议问题