Long Filename Creates an MS-DOS Volume LabelLast reviewed: September 10, 1997Article ID: Q125019 |
The information in this article applies to:
SYMPTOMSAfter saving a file with a long filename to the root directory of an unlabeled FAT-formatted drive, you see an unexpected volume label when you reboot under MS-DOS. For example, if you save a file as NEWTESTFILE.TXT on a file allocation table (FAT) partition, Windows NT creates NEWTESTFILE.TXT and NEWTES~1.TXT. If you boot MS-DOS, the DIR *.TXT command displays:
Volume in drive C is BX Volume Serial Number is 1CC3-3E96 Directory of C:\ NEWTES~1 TXT 11,438 01-16-95 6:28p 1 file(s) 11,438 bytesNote that the volume label is BX.
CAUSEThis situation occurs due to the new Windows NT version 3.5 long filename design for FAT-formatted drives. When you create a long filename under Windows NT, the FAT file system creates one file but stores both the long filename and short filename in the directory. One directory entry is used for short file names, and one or more directory entries are used to store long filenames. NOTE: For more information on how Windows NT creates short filenames, see article Q101601 in the Microsoft Knowledge Base.
WORKAROUNDTo work around this situation, do not use long filenames when you write files to the root directory of FAT-formatted drives, or turn off the option to use long filenames. To turn off long filename support under Windows NT version 3.5: WARNING: Using Registry Editor incorrectly can cause serious, system- wide problems that may require you to reinstall Windows NT to correct them. Microsoft cannot guarantee that any problems resulting from the use of Registry Editor can be solved. Use this tool at your own risk.
MORE INFORMATIONThe structure of a MS-DOS entry is:
Filename: 8 byte Extension: 3 byte Attribute: 1 byte Reserved: 10 byte Time: 2 byte Date: 2 byte Starting cluster: 2 byte File Size: 4 byteThe layout of the attribute byte is:
Bit Attribute --- -------------- 7 reserved 6 reserved 5 archive 4 sub-directory 3 volume label 2 system file 1 hidden file 0 read-only fileA dump of the directory structure from the previous NEWTESTFILE.TXT example shows:
42 58 00 54 00 00 00 FF - FF FF FF 0F 00 46 FF FF BX.T... ..F FF FF FF FF FF FF FF FF - FF FF 00 00 FF FF FF FF .. 01 4E 00 45 00 57 00 54 - 00 45 00 0F 00 46 53 00 .N.E.W.T.E...FS. 54 00 46 00 49 00 4C 00 - 45 00 00 00 2E 00 54 00 T.F.I.L.E.....T. 4E 45 57 54 45 53 7E 31 - 54 58 54 20 00 32 2A 6B NEWTES~1TXT .2*k 32 1E 32 1E 00 00 2A 6B - 32 1E F0 0F BA 01 00 00 2 2 ..*k2 =.¦...The NEWTES~1.TXT entry attribute byte is 20 (hexadecimal), indicating a file with just the archive bit set. Both entries for NEWTESTFILE.TXT have the attribute byte set to 0F (hexadecimal), indicating a read-only, system, hidden file, and a volume label. This combination is not expected in the MS- DOS environment.
|
KBCategory: kbinterop
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |