How Windows Generates 8.3 File Names from Long File Names

Windows generates short file names from long file names in the following manner:

  • Windows deletes any invalid characters and spaces from the file name. Invalid characters include:

    . " / \ [ ] : ; = ,
  • Because short file names can contain only one period (.), Windows removes additional periods from the file name if valid, non-space characters follow the final period in the file name. For example, Windows generates the short file name
    Thisis~1.txt

    from the long file name

    This is a really long filename.123.456.789.txt

    Otherwise, Windows ignores the final period and uses the next to the last period. For example, Windows generates the short file name

    Thisis~1.789

    from the long file name

    This is a really long filename.123.456.789.
  • Windows truncates the file name, if necessary, to six characters and appends a tilde (~) and a digit. For example, each unique file name created ends with "~1." Duplicate file names end with "~2," "~3," and so on.
  • Windows truncates the file name extension to three characters or less.
  • Windows translates all characters in the file name and extension to uppercase.

Note that if a folder or file name contains a space, but less than eight characters, Windows still creates a short file name. This behavior may cause problems if you attempt to access such a file or folder over a network. To work around this situation, substitute a valid character, such as an underscore (_), for the space. If you do so, Windows does not create a different short file name

For example, "Afile~1.doc" is generated from "A file.doc" because the long file name contains a space. 
No short file name is generated from "A_file.doc" because the file name contains less than eight characters and does not contain a space. 
The short file name "Alongf~1.txt" is generated from the long file name "A long filename.txt" because the long file name contains more than eight characters.

 

转自:http://www.cnblogs.com/jiangzhen/p/3957333.html

[转]windows 短文件名/短路径名规则的更多相关文章

  1. windows 短文件名/短路径名规则

    How Windows Generates 8.3 File Names from Long File Names Windows generates short file names from lo ...

  2. 关于CMD/DOS中的短文件名规则

    最近在制作一个批处理的过程中发现一个很郁闷的问题,就是有些时候搜索到的结果不是我们想要的

  3. IIS短文件名泄露漏洞危害及防范方法

    危害级别:轻微 IIS短文件名泄露漏洞 WASC Threat Classification 描述: Microsoft IIS在实现上存在文件枚举漏洞,攻击者可利用此漏洞枚举网络服务器根目录中的文件 ...

  4. 利用URLScan工具过滤URL中的特殊字符(仅针对IIS6)-- 解决IIS短文件名漏洞

    IIS短文件名漏洞在windows服务器上面非常常见,也就是利用“~”字符猜解暴露短文件/文件夹名,比如,采用这种方式构造URL:http://aaa.com/abc~1/.aspx,根据IIS返回的 ...

  5. IIS短文件名泄露漏洞危害及防范方法(转)

    攻击方法(转自http://blog.sina.com.cn/s/blog_64a3795a01017xqt.html) 一直在寻找一种方法,如果我可以使用通配符"*" 和 &qu ...

  6. 【中间件】IIS短文件名枚举漏洞

    1.1.1  漏洞描述 为了兼容16位MS-DOS程序,Windows为文件名较长的文件(和文件夹)生成了对应的windows 8.3 短文件名. 在Windows下查看对应的短文件名,可以使用命令 ...

  7. IIS短文件名漏洞复现

    IIS短文件名漏洞复现 一.漏洞描述 此漏洞实际是由HTTP请求中旧DOS 8.3名称约定(SFN)的代字符(~)波浪号引起的.它允许远程攻击者在Web根目录下公开文件和文件夹名称(不应该可被访问). ...

  8. IIS短文件名漏洞原理与挖掘思路

    首先来几个网址先了解一下 https://www.jb51.net/article/166405.htm https://www.freebuf.com/articles/web/172561.htm ...

  9. 关于Windows文件名和路径名的那些事

    博客搬到了fresky.github.io - Dawei XU,请各位看官挪步.最新的一篇是:关于Windows文件名和路径名的那些事.

随机推荐

  1. ASP.NET中Cookies的使用

    准备开始写后台代码了,不过刚看到cookies就傻眼了,网上搜集了一些资料,总结了一下,初学者可以看看. 创建COOKIES System.Web.HttpCookie cookie=new Http ...

  2. LintCode Two Sum

    1. 数组numbers == null 及numbers.length == 0, 而不是用numbers[] 2. HashMap<Integer, Integer>而不是<in ...

  3. function中的ajax怎么返回一个数

  4. 最新AFNetworking

    1.网络监测 /** * 网络检测 */ - (void)networkingMonitoring { //打开网络监测 [[AFNetworkReachabilityManager sharedMa ...

  5. DLL编程学习

    原文出处:http://www.blogjava.net/wxb_nudt/archive/2007/09/11/144371.html DLL编写教程 半年不能上网,最近网络终于通了,终于可以更新博 ...

  6. codeforces 27E Number With The Given Amount Of Divisors

    E. Number With The Given Amount Of Divisors time limit per test 2 seconds memory limit per test 256 ...

  7. this其实是js的一个对象谁调用它它就指向谁

    本人看了一下,感觉对this解释的有点复杂了,因此,本人在此给this一个简单易于理解的定义. 因为上面计算出来的结果不符合我们的习惯,并且负值在计算的时候会影响正确性,现在我们给这个结果加上180 ...

  8. API测试

    API(Application Programming Interface)包含: 单元测试(Unit Testing).模块测试(Module Testing).组件测试(Component Tes ...

  9. Quartus II 与 Modelsim 联调【转】

    Quartus II 9.0版本的时候软件还有自带的仿真工具,现在安装的是11.0以上版本,才发现 Quartus II 11.0以上取消了软件自带的波形仿真工具,因此需要波形仿真就要调用专业的仿真工 ...

  10. Web性能测试的简介

    一.术语 1.并发用户:并发一般分两种.1)严格意义上的并发,即所有的用户在同一时刻做同一件事情或操作,这种操作一般指做同一类型的业务:2)广义范围的并发,与前者主要区别,尽管多个用户对系统发出了请求 ...