ARCHIVED: In Windows 2000 and XP, how do long filenames translate into short filenames?

This content has been archived, and is no longer maintained by Indiana University. Information here may no longer be accurate, and links may no longer be available or reliable.

Windows 2000 and XP support long filenames on local and remote file systems, which may be shared with DOS and Windows 3.1 (e.g., FAT partitions, and shared files on NetWare). If the files are to be visible from DOS, DOS applications, or Win16 applications, the long filenames must be translated into the 8.3 standard.

Note: Be careful when accessing files with long filenames from DOS programs. Some programs will write to a temporary file, and then delete the original file and rename the temporary file when you save the data. This will cause loss of the long filename.

Windows 2000 and XP translate long filenames into 8.3 filenames in the following way: For the first four files which share the same first six characters and the same filename extension (the three characters that come after the period), the filenames are truncated to six characters (after taking away the spaces), and an identifier number is added.

For instance, suppose you have four files named as follows:

  The Foreign Legion 1.doc
  The Foreign Legion 2.doc
  The Foreign Legion 3.doc
  The Forgotten Balloon.doc

You would see the following in an environment that displays the 8.3 name, such as an MS-DOS prompt:

  THEFOR~1.DOC
  THEFOR~2.DOC
  THEFOR~3.DOC
  THEFOR~4.DOC

Therefore, it is a good idea to give your files unique names starting with the first character to avoid the confusion that is caused when similar long filenames are shortened to eight characters.

For example, if you save your lab results each night, name them as follows:

  1 Lab Result.doc
  2 Lab Result.doc

This will result in filenames which are more obviously distinct, while the following examples will be truncated as described above:

 Lab Result 1.doc
 Lab Result 2.doc

This is document acyu in the Knowledge Base.
Last modified on 2018-01-18 10:49:31.