As mentioned earlier, the FAT file system is named for its method of organization the file allocation table. This table of values provides links from one allocation unit (one or more sector) to another.
This illustration includes three files. The file named FILE1.TXT is a file that is large enough to take the space of three allocation units. A small file, FILE3>TXT, takes space in only one allocation unit. The third file, FILE2.TXT, is a large, fragmented file. In each case, the directory entry points to the first allocation unit containing the file. If the file contents go beyond one allocation unit. The first allocation points to the next in the chain. FFF indicates the end of the chain.
Simple File System
The FAT file system is a simple file system originally for small disks and simple directory structures. Its design has been improved over the years to work more effectively with larger disks and more powerful personal computers. With MS-DOS version4.0, the FAT entries grew from 12 bits to 16 bits in size, thus allowing for partitions larger than 32 MB.
The root directory has a fixed size and location on the disk. Directories are special files with 32-byte entries for each file contained in that directory. The entry for each file includes the following information :
- filename (eight-plus-three-characters)
- attribute byte(8 bit worth of information, described below)
- modification time(16 bits)
- modification date(16 bits)
- starting allocation unit(16 bits)
- file size (23 bits)
This information is used by all operating systems that support the FAT file system. In addition, Windows NT can store additional timestamps in a FAT directory entry. These time stamps show when the file was created or last accessed and are used principally by POSIX applications.
FAT File System Attribute
Bits in the attribute byte of the directory entry of a file indicates whether the file has certain attributes. One bit indicates that the file is a subdirectory, while another bit marks the file as a volume label. Normally, only the operating system controls the settings of these bits. In addition, a FAT file has four special attributes that can be turned on or off by the user- archive file, system file, hidden file, and read-only file.
Windows NT versions 3.5 and later use these attribute bits to support long filenames up to 256 characters on FAT partitions. In a way that does not interface with how MS_DOS or OS/2 access the partitions. Whenever a user creates a file with a long filename (that is, a filename that exceeds the eight-plus-three limits of the FAT file system on MS-DOS and OS/2 or that contains extended or mixed-case characters). Windows NT creates a conventional directory entry for the file. Supplying an eight-plus-three name in the same manner as for a file on an NTFS volume.
In addition to this conventional entry, Windows creates one or more secondary directory entries for the file. One for every 13 characters in the long filename. Each of these secondary directory entries stores a corresponding part of the long filename in Unicode.
Windows NT sets the volume read-only, system, and hidden file attribute. That is on bits of the second directory entry to mark it as part of a long filename. MS-DOS and OS/2 generally ignore directory entries with all four of these attribute bits set. So these entries are effectively invisible to these operating systems. Instead, MS-DOS and OS/2 access the file using the eight-plus-three filename contained in the conventional directory entry for the file.
Risk of Third Party Tools
Some third-party disk management utilities that directly manipulate the FAT might regard the long filename directory entries created by Windows NT as errors in the logical structure of the disk volume. So may damage the directory entries. Or even the file itself trying to correct the error. Do not use a third-party disk utility to repair or defragment a FAT partition used by Windows NT. Unless the disk utility has been certified as being compatible with Windows NT version 3.5 or later. You can safely use the Scandisk and Chkdsk utility supply with MS-DOS version 6.0 and later to repair a damaged FAT partition. But do not use the defrag utility to defragment a FAT partition containing long filenames because it tends to discard long filename information.
Prevent Disk Error
By default, Windows NT 3.5 supports long filenames on FAT partitions. If you want to be able to use third-party disk utilities to repair or defragment FAT partitions used by Windows NT, set the Win31FileSystem parameter of the following Registry entry to 1 :
Setting this value will prevent Windows NT from creating new long filenames on all FAT partitions. It does not affect existing long filenames.
Using The FAT file system works the same as it does with MS-DOS and Windows. In fact, you can install Windows NT on your existing FAT partition. Note remembered that you cannot use Windows NT with any compression or partitioning software that requires drivers to be loaded by MS-DOS. Rather, you must have Windows NT specific versions of the drivers to enable Windows NT to read the disk.
You can move or copy files between FAT and NTFS volumes. When you move or copy a file from NTFS to FAT, permissions and alternate streams are lost.