Data Structure - MS-DOS Directory Entry 12.01.84 - cbradley - from "Disk Operating System" (IBM Corp.) The basic directory area for all types of disks is constructed by the FORMAT utility. The directory's location is available through the device driver interfaces as a logical sector number. MS-DOS directory entries are 32 bytes in length, in the following format: Byte Offset Description 0-7 Filename (text) - byte 0 indicates the file status byte 0 == 00 -> never been used byte 0 == E5 -> was used, now deleted byte 0 == 2E -> is a subdirectory byte 0 == anything else is char 0 of the filename 8-10 Filename extension 11 File attribute. Mapped as follows: 01 -> read-only 02 -> hidden file 04 -> system file 08 -> volume label 10 -> is sub-dir 20 -> Archive bit 12-21 Reserved. 22-23 Time-stamp of file creation or update. Time is mapped into bits as shown below: < hh > < mm > < xx > 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 where: hh == binary number of hrs (0-23) mm == binary number of mins (0-59) xx == binary number of TWO-SECOND increments 24-25 Date-stamp of file creation or update. Bits are mapped as follows: < 25 > < 24 > 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 y y y y y y y m m m m d d d d d where: m == 1-12 d == 1-31 y == 0-119 (1980 to 2099) 26-27 Starting cluster number in FAT of file - the relative cluster number of the first cluster of disk belonging to the file 28-31 File size in bytes. First word contains low-order part of the size figure. Both words are stored with the LSB first.