How Windows NT Generates MS-DOS Compatible Filenames

Last reviewed: May 6, 1997
Article ID: Q99589

The information in this article applies to:

- Microsoft Windows NT operating system version 3.1

SUMMARY

Windows NT file system (NTFS) filenames do not have the same limitations that MS-DOS FAT style filenames have. MS-DOS style filenames are limited to eight and three character strings separated by a period. NTFS filenames can be much longer and may contain more types of characters. When Windows NT copies a file from an NTFS partition to a FAT partition, it needs to change the filename for compatibility. The following rules are applied when filenames are converted from NTFS to FAT:

  • All spaces in the NTFS filename are removed.
  • All periods except the last one preceding a character are removed.
  • The first three characters following the last period are used for the three letter extension of the FAT filename.
  • All characters that are illegal in FAT but legal in NTFS are replaced with underscore characters ("_").
  • The first six characters of the NTFS filename, a tilde character (~), and a single digit are used for the eight letter prefix of the FAT filename.

    If this does not result in a unique filename, only the first five characters of the NTFS filename are used, followed by the tilde and two digits.

When filenames are moved from a FAT partition to an NTFS partition, no conversion takes place because NTFS fully supports the FAT file naming convention.


Additional query words: prodnt
Keywords : kbother ntfilesys
Version : 3.1
Platform : WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: May 6, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.