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. Json.net说法——(一)修饰标签,日期序列化

    摘自: http://www.cnblogs.com/jams742003/archive/2009/12/24/1631587.html 通过属性标签自定义JSON序列化 JsonObjectAtt ...

  2. pyspider介绍及安装

    一.pyspider简介 1.通过python脚本进行结构化信息的提取,follow链接调度抓取控制,实现最大的灵活性 2.通过web化的脚本编写.调试环境.web展现调度状态 3.抓取环模型成熟稳定 ...

  3. shell的浮点运算

    参考: https://www.linuxquestions.org/questions/linux-software-2/multiply-floats-in-bash-script-618691/ ...

  4. EffectiveJava(30) -- 全面解析enum类型

    --在大多数项目中,我们会经常使用int类型来声明final类型的常量,它在不考虑安全的情况下确实能满足我们绝大多数的需求.但是在JDK1.5版本发布之后,声明一组固定的常量组成合法值的类型就建议使用 ...

  5. C#秘密武器之表达式树

    一.表达式树入门 Lambda表达式树很复杂,从概念上很难理解清楚,一句话,表达式树是一种数据结构!这里我们通过下面的这个例子来理解一下表达式树,你就能看个大概: lambda表达式树动态创建方法 s ...

  6. Android开发 之 我的jar包引用方法

    1.在工程上名上右键->Build Path ->Configure Build Path 2.在Libraries选项卡中,选择右侧的Add External JARs,然后选择要导入的 ...

  7. 算法笔记_073:哈密顿回路问题(Java)

    目录 1 问题描述 2 解决方案   1 问题描述 什么是哈密顿回路? 引用自百度百科: 哈密顿图(哈密尔顿图)(英语:Hamiltonian path,或Traceable path)是一个无向图, ...

  8. spring cloud jackson 枚举json互转 枚举json序列化/反序列化

    先定义一个枚举基类 import com.fasterxml.jackson.databind.annotation.JsonDeserialize; @JsonDeserialize(using = ...

  9. 课程分享 企业普及版贝斯OA与工作流系统

    企业普及版贝斯OA与工作流系统 基于J2EE+JBPM3.x/JBPM4.3+Flex流程设计器+Jquery+授权认证企业普及版贝斯OA与工作流系统 假设对这个课程有兴趣的.能够和我联系.QQ205 ...

  10. ZK框架笔记1、ZK Ajax框架简介

    简介    ZK是一个基于事件驱动和组件的框架,他为web应用提供了丰富的接口.zk包括一个基于Ajax的事件驱动引擎.一整套丰富的XML用户接口语言(XML User Interface Langu ...