为什么不能在windows 7中命名文件夹“..”?

有时出于好奇,或者出于做一些不同事情的实际愿望,您可能会尝试在Windows系统上为文件夹使用一些不寻常的名称,但结果不一。有鉴于此,今天的超级用户问答帖子回答了一位好奇读者的问题。...

为什么不能在windows 7中命名文件夹“..”?

有时出于好奇,或者出于做一些不同事情的实际愿望,您可能会尝试在Windows系统上为文件夹使用一些不寻常的名称,但结果不一。有鉴于此,今天的超级用户问答帖子回答了一位好奇读者的问题。

今天的问答环节是由SuperUser提供的,SuperUser是Stack Exchange的一个分支,是一个由社区驱动的问答网站分组。

消息窗口截图由Ben N(超级用户)提供。

问题

超级用户读者EdwardBlack想知道为什么不能命名文件夹。在他的Windows 7系统上:

I just noticed that it is not possible to name a folder ._. on my Windows 7 system. It gets renamed to ._ instead. Sometimes it disappears just after naming it, but then reappears after refreshing the view. Windows seems to have a problem with dots at the end of a filename. Why is this?

为什么不能命名文件夹。\u。在Windows7中?

答案

超级用户贡献者Ben N为我们提供了答案:

Windows normally requires files to have either no extension or an extension that is at least one character long. It does not like zero length extensi*** (i.e. file names that end with a period). Folders can have extensi*** too, therefore, Windows does not let their names end with a period.

Source: From the article linked to by DavidPostill:

  • Use a period to separate the base file name from the extension in the name of a directory or file.

If you try to end a file or directory name with a period, Windows just assumes that you did not want an extension and thus removes it (even if you create it with the md command in a command prompt window).

Danger Zone

If you really want a folder name to end with period, you will need to use the magic raw name override sequence of \\?\. In a command prompt window, md \\?\C:\path\to\container\._. will indeed create a folder named ._., but lots of programs will have problems with it, even Windows Explorer:

007Ys3FFgy1gpdz608lq2j30hd04qjrp

Such a directory can only be removed with the rd command followed by its \\?\ name, or renamed with its short (8.3, dir /x) name.


有什么要补充的解释吗?在评论中发出声音。想从其他精通技术的Stack Exchange用户那里了解更多答案吗?在这里查看完整的讨论主题。

  • 发表于 2021-04-10 00:49
  • 阅读 ( 148 )
  • 分类:互联网

你可能感兴趣的文章

为什么windows会自动保存注册表?

... 即使你知道它是什么,关于它是如何工作的,以及为什么它对Windows操作很重要,仍然有很多谜团。 ...

  • 发布于 2021-03-12 23:10
  • 阅读 ( 187 )

10个最佳windows文件资源管理器技巧和调整

...就是文件资源管理器的快捷键。一旦你掌握了这些你会想为什么你浪费时间点击。以下是一些最常见的: ...

  • 发布于 2021-03-13 13:30
  • 阅读 ( 285 )

7个免费的windows工具来自动执行重复的任务

...些软件是一件痛苦的事,但卸载所有软件则更糟。这就是为什么我依赖于批量卸载应用程序的方法。 ...

  • 发布于 2021-03-14 01:07
  • 阅读 ( 262 )

7个你永远无法理解的windows谜团

... 让我们来看看这些谜团。你可能想知道为什么窗户在某些地方很特别,或者根本没有注意到它们。下面是你日常操作系统中一些神秘的小元素的答案。 ...

  • 发布于 2021-03-14 02:33
  • 阅读 ( 232 )

7个简单的windows脚本,为您节省时间和精力

... 是否有其他要与其他用户共享的Windows脚本?为什么不加入下面评论部分的对话呢? ...

  • 发布于 2021-03-15 21:37
  • 阅读 ( 282 )

文件扩展名指南:如何修复和批量重命名文件

...。打开“文件资源管理器”并导航到要查看文件扩展名的文件夹。 ...

  • 发布于 2021-03-17 01:25
  • 阅读 ( 331 )

11个奇怪的窗户虫子和复活节彩蛋

...,从结果中减去2。Windows计算器给你什么结果?明白他们为什么不让你在学校用计算器了吗? ...

  • 发布于 2021-03-25 13:30
  • 阅读 ( 307 )

微软在命名产品方面很差劲

...的名字。我们收到了一些困惑的读者的信息,他们想知道为什么当我们说某个功能在秋季Creators更新中时,他们的PC上没有该功能。那些读者实际上是在使用创作者的更新,却没有意识到这是另一回事。 “十一月更新”更糟。当...

  • 发布于 2021-04-06 21:41
  • 阅读 ( 208 )

适用于windows的最佳文件提取和压缩工具

...看.zip文件的内容,请双击它。Windows打开它就像打开一个文件夹一样。您可以复制和粘贴文件,或将文件拖放到ZIP文件或从ZIP文件中拖放文件,以从ZIP文件中提取文件,或向ZIP文件中添加新文件。您也可以在这里删除或重命名文...

  • 发布于 2021-04-07 05:34
  • 阅读 ( 182 )

如何在virtualbox中转换固定磁盘和动态磁盘

...机。它的磁盘将是固定的或动态的磁盘,无论您将其转换为什么。

  • 发布于 2021-04-07 14:48
  • 阅读 ( 242 )
uza31
uza31

0 篇文章

相关推荐