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.

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. Maven C盘用户文件下没有.m2

    在配置好Maven的环境之后,先运行一条命令: mvn help:system 该命令会打印出所有的Java系统属性和环境变量. 运行这条命令的目的是让Maven执行一个真正的任务.可以从命令行上看到 ...

  2. c#跟objective-c语言特性的对比

    拿c#语言跟objective-c做个对比,记录下自己认为是差不多的东西. 学过objc的人相信对category这个东西肯定不陌生,它可以让我们在没有源码的基础上对原先的类添加额外的一些方法,写到这 ...

  3. cglib Demo

    转载自:http://huihai.iteye.com/blog/858524 http://www.cnblogs.com/shijiaqi1066/p/3429691.html

  4. 新手IOS tweak越狱app开发记录

    需要改变原先程序功能流程的话,是要用到Logos Tweak 开发.另外,.在苹果商城下载到的app,不能直接拿来分析.需要先做一定的前期准备.网上有很多相关的写第一个越狱插件的文章,这里就不在赘言了 ...

  5. 运用Unity实现依赖注入[有参构造注入]

    上一篇章讲到关于使用Unity实现依赖注入的简单功能,针对有博友提出关于有参构造注入的问题; 本文同样通过一个实例来讲解如何实现此功能,文中一些分层讲解可以看上一文章(运用Unity实现依赖注入[结合 ...

  6. 刻录车载CD音乐光盘的历程

    1.买盘 车载CD播放器不支持读可重复擦写的光盘,所以买了sony的DVD+R 4.7G(它是用来存储数据和视频的),买错了,刻了车载CD播放器也不能播放(苦笑脸#).之后又买CD+R. 2.下载歌曲 ...

  7. PL/SQL TOAD 不安装Oracle客户端连接数据库的方法

    不安装Oracle客户端连接数据库的方法 本机环境: win7 64位中文旗舰版 一.准备工作: 1)到ORACLE官网下载instantclient,下载地址:http://www.oracle.c ...

  8. yii xss模型安全

    在这篇文章里,我们将描述一个基于WEB应用下避免不合法的内容注入. 我们要在一个行为里使用htmlpurifier类,用这种行为可以加强任何模型并表明各属性我们想让它们XSS安全. 我写了以下行为: ...

  9. self.navigationItem.titleView 不居中显示的问题

    自定义一个AUIView, AUIView * v=[AUIView new]; self.navigationItem.titleView = v; 在AUIView类内重写 setFrame -  ...

  10. Excel 출력

    NativeExcel 참조 사이트 http://www.nika-soft.com/dwnld.htm IWorkbook book = Factory.CreateWorkbook(); lWo ...