[Go]windows short filename/short path name rule

Source: Internet
Author: User

How to Windows generates 8.3 file Names from Long File Names

Windows generates short file names from a 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 namethisis~1.txtfrom The long file namethis is a really long filename.123.45 6.789.txtOtherwise, Windows ignores the final period and uses the next to the last period. For example, Windows generates the short file namethisis~1.789from The long file namethis is a really long filename.123.45 6.789.
  • Windows truncates the file name, if necessary, to six characters and appends a tilde (~) and a digit. For example, the unique file name created ends with "to". Duplicate file names end with "~", "~" and so on.
  • Windows truncates the file name extension to three characters or less.
  • Windows translates all characters with the file name and extension to uppercase.
Note if a folder or file name contains a space, but less than eight characters, Windows still creates a short file na Me. This behavior could cause problems if you attempt to access such a file or folder over a network. To work around-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" was generated from "a File.doc" because the long file name contains A space.
No short file name was generated from ' A_file.doc ' because the file name contains less than eight characters and does not C Ontain a space.
The short file name "Alongf~1.txt" was generated from the long file name "A long filename.txt" because the long file name C Ontains more than eight characters.

Transferred from: http://www.cnblogs.com/jiangzhen/p/3957333.html

[Go]windows short filename/short path name rule

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.