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. phpcms v9 wap手机门户站点内容页添加上一篇、下一篇的方法

    PHP源码修改:打开 phpcms\modules\wap\index.php 文件找到if(!$r || $r['status'] != 99) showmessage(L('info_does_n ...

  2. ActiveMQ订阅模式持久化实现

    实现步骤:1.配置发送xml,applicationContext-send.xml <?xml version="1.0" encoding="UTF-8&quo ...

  3. C#秘密武器之委托

    在C#的世界里,委托是无处不在,尤其在.NET自己封装的框架里到处都有其身影,所以掌握委托就很有必要了!那什么是委托呢?其实委托就是一种数据类型,跟int等东东差不多,只不过在使用时要自己先去构建一个 ...

  4. css学习笔记 --初学 css代码风格、布局误区

    初学css,记录下初学者需要注意的事项. 一.css 代码风格 1.css 命名语义化. 如类名: main   主体   container 内容 footer    站底 right.center ...

  5. 解决oracle和plsql乱码问题

    oracle 10g装上后,建了个表写入中文数据,发现通过工具DbVisualizer 6.5 写入/读取中文都正常,就sqlplus和PL/SQL Developer不正常. 初步怀疑是DbVisu ...

  6. SurfaceView绘制录音波形图

    本文简单记录由View绘制转为SurfaceView绘制的波形图问题. 上代码: public class VoiceLineView extends View { private final int ...

  7. iOS/iphone开发如何为苹果开发者帐号APPID续费

    原文地址:iOS/iphone开发如何为苹果开发者帐号APPID续费作者:陈双超_群雄 其实相当的简单,这篇内容是给财务看的,有的地方连我自己看了都感觉有点...但如果不详细,她又要为难我,所以我就当 ...

  8. win64 QT(VS2013) 配置 CGAL+libQGLViewer

    网上讲的都不是太全 我来说说把~ 首先感谢这位大神: chenwk891:http://blog.csdn.net/chenwk891/article/details/42171495#reply 还 ...

  9. spring-boot 集成 swagger 问题的解决

    spring-boot 集成 swagger 网上有许多关于 spring boot 集成 swagger 的教程.按照教程去做,发现无法打开接口界面. 项目由 spring mvc 迁移过来,是一个 ...

  10. Java中abstract class 和 interface 的解释和他们的异同点(转)

    (一)概述    在Java语言中, abstract class 和interface 是支持抽象类定义的两种机制.正是由于这两种机制的存 在,才赋予了Java强大的 面向对象能力.abstract ...