无法创建名为“Aux"的目录或以“Aux."开头在 Windows 8.1 上 [英] Cannot create a directory named "Aux" or starting by "Aux." on Windows 8.1

查看:108
本文介绍了无法创建名为“Aux"的目录或以“Aux."开头在 Windows 8.1 上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚在 Windows 8.1 上遇到了一个非常奇怪的错误.

I just encountered a really weird bug on Windows 8.1.

我似乎无法创建名为 Aux 或以 Aux. 开头的文件夹.我尝试了每个磁盘,但每次都收到以下消息:Le nom du périphérique spécifié n'est pas valide(指定设备的名称无效).

I can't seem to be able to create a folder named Aux or starting by Aux.. I tried on every disk, but I get the following message every time: Le nom du périphérique spécifié n'est pas valide (The name of the specified device is invalid).

这是为什么?有具体/有效的理由吗?它特定于我的计算机吗?

Why is that? Is there a specific/valid reason? Is it specific to my computer?

我发现了这一点,因为我以编程方式创建了一个名为 Aux 的文件夹,并且无法再删除它.我想我必须运行脚本或程序才能摆脱它.(在 Windows 上这种情况通常会发生)

I discovered this because I programatically created a folder named Aux and I can't delete it anymore. I guess I have to run a script or program to get rid of it. (As it usually happens with such scenario on Windows)

推荐答案

auxprncon(以及其他一些)是保留用于遗留原因.例如,prn 指的是打印机,而 con 指的是标准键盘(控制台).我猜这是出于兼容性原因保留的 MS-DOS 的残余.

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.

您仍然可以在命令提示符处看到正在使用的 con:在您具有写入权限的文件夹中输入 copy con test.txt,输入一些文本,然后点击F6 提交到磁盘,然后键入 test.txt 以在屏幕上显示您键入的内容.

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.

命名文件、路径和命名空间 (Windows) 中有大量信息 - 对于与您的问题相关的部分,请参阅带有要点的部分,特别是此项目:

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 和 LPT9.还要避免这些名称后紧跟扩展名;例如,不推荐使用 NUL.txt.有关详细信息,请参阅命名空间.

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.

这篇关于无法创建名为“Aux"的目录或以“Aux."开头在 Windows 8.1 上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆