Files with long names

  • All described above represents classical way of describing files with names in «8.3» format in FAT folder. But Windows 95 is known to support long file names (up to 255 chars) allowing almost any chars in Unicode encoding. Microsoft developers handled it simple allocating not one, but several adjacent 32-byte elements for each file in a folder. The number of elements used for a long name depends on its length. First several elements contain a long name followed by a usual element with the structure provided for a short name containing an uppercase file name. Elements with parts of this long name are numbered one after one. The 01h element is located just before the element with a short name. If one element with a long name fragment is insufficient, another 02h element is used, etc. The number of the last element is increased by 40h. If a long name takes one element, its number will be 41h.

    A folder record with a fragment of a long name has the following structure:
    Offset, Length, Purpose
    bytes bytes
    0 1 Element's number
    1 10 Name (or its fragment)
    0Bh 1 File attributes (always 0Fh)
    0Ch 1 Reserved
    0Dh 1 Check code (calculated from short name)
    0Eh 12 Name (continued)
    1A 2 Number of the first cluster (0)
    1Ch 4 Name (continued)

    The above scheme can be viewed in Acronis DiskEditor program in the view as FAT folder mode. As you can see above, test.txt file created by us corresponds to two folder elements. The lower line indicating Short Name value in the drop-down list on the left and the uppercase name (TEST.TXT), and the upper one indicating Long Name value in the list and 041h in the Ext/Prefix field indicating that file's long name took one additional folder record.
Publisher, webmasters and all viewers are allowed to reprint all useful articles on our site freely.
But note that you must add the following credit information to anywhere that you put our website resources:
"Article reprint is permitted by www.data-recovery-app.com" and a hyperlinke back to http://www.data-recovery-app.com is required.