什么是各种平台的保留文件名? [英] What are reserved filenames for various platforms?

查看:135
本文介绍了什么是各种平台的保留文件名?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我没有询问关于文件名的一般语法规则。我的意思是从哪里跳出来咬你。例如,试图命名文件COM< n>在Windows上?

解决方案

From: http://www.grouplogic.com/knowledge/index.cfm/fuseaction/view_Info/docID/111


以下字符在使用NTFS的Windows上作为文件或文件夹名称无效: / < > \ * | <$ c $



除了上面的非法字符,插入符和任何可以用Ctrl键输入的字符在使用FAT文件系统的Windows操作系统下,也不允许使用^

在Windows下使用FAT文件系统文件和文件夹名称长达255个字符。



在Windows下使用NTFS文件系统文件和文件夹名称可能长达256个字符。



在Window下,两个系统下的完整路径的长度为260个字符。



除了这些字符,以下约定也是非法的:


  • 在名称末尾放置空格
  • 在句点名称



以下文件名也保留在Windows下:


  • com1

  • com2 li>
  • ...

  • com9

  • lpt1

  • lpt2
  • > ...
  • lpt9

  • code $ $ b $ li $ $ c $ n $ n code $
    $ li $ coden



I'm not asking about general syntactic rules for file names. I mean gotchas that jump out of nowhere and bite you. For example, trying to name a file "COM<n>" on Windows?

解决方案

From: http://www.grouplogic.com/knowledge/index.cfm/fuseaction/view_Info/docID/111.

The following characters are invalid as file or folder names on Windows using NTFS: / ? < > \ : * | " and any character you can type with the Ctrl key.

In addition to the above illegal characters the caret ^ is also not permitted under Windows Operating Systems using the FAT file system.

Under Windows using the FAT file system file and folder names may be up to 255 characters long.

Under Windows using the NTFS file system file and folder names may be up to 256 characters long.

Under Window the length of a full path under both systems is 260 characters.

In addition to these characters, the following conventions are also illegal:

  • Placing a space at the end of the name
  • Placing a period at the end of the name

The following file names are also reserved under Windows:

  • com1,
  • com2,
  • ...
  • com9,
  • lpt1,
  • lpt2,
  • ...
  • lpt9,
  • con,
  • nul,
  • prn

这篇关于什么是各种平台的保留文件名?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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