PC Hardware

The Windows 95 File Structure

Disk structures have not changed in Windows 95. Partitions are still exactly the same, so the MS-DOS 7 bootable files of Windows 95 must still be installed to the C drive. Windows 95 still uses 16-bit FAT (FAT16) formats for hard disk drives and floppy disk. The FDISK and FORMAT commands are still used to set up hard drives. A hard drive that was partitioned with FDISK and formatted with an older version of MS-DOS is exactly like a Windows 95 drive. Windows 95 OSR2 and Windows 98 support 32-bit FAT (FAT32). This file system improves storage efficiency by reducing cluster sizes on large partitions. The following table shows the Windows 95 versions and their appropriate file system.

Version Description
Version A The original Windows 95 release-intended for upgrading from Windows 3.1. Uses FAT16 file system.
Version B The OEM (original equipment manufacturer) version-intended for installation on new computers only. Uses FAT16.
OSR2 The final version of Windows 95 (sometimes referred to as Version C)- intended for installation on new computers only. Uses FAT32 file system. End users cannot buy this version as a retail product.

32-Bit VFAT

Disk access is provided through the 32-bit VFAT (virtual file allocation table). Unlike the 16-bit FAT used in previous versions, VFAT is a virtual device driver that operates in protected mode. This provides more reliability and works with a greater variety of hardware. Don't confuse 32-bit VFAT with 32-bit FAT, which has to do with how data is stored on a hard disk partition (the cluster size) while VFAT has to do with how files are accessed.

NOTE
VFAT was formerly known as 32-bit file access in Windows 3.1.

Long Filenames

In MS-DOS and Windows 3.x, filenames were in what is called an 8.3 ("eight dot three") format. That is, the filename itself was restricted to a maximum of eight characters in length, and the extension to a maximum of three characters in length. Filename and extension are connected by a period, or "dot." Windows 95 supports long filenames (LFNs). The LFN removes the 8.3 filename limitation of older MS-DOS and Windows operation systems. In a regular MS-DOS 8.3 file specification directory, all file records are stored in 32-byte records. Ten of these 32 bytes are "reserved." The other 22 bytes are used to store information on starting clusters, creation date, and creation time, and 11 bytes are for the filename itself. LFNs exist on FAT partitions by chopping the filename into 12-byte chunks (stealing one of the "reserved" bytes) and allowing up to 13 chunks, creating a filename of up to 255 characters.

When an LFN is saved, the system creates a short name that conforms to the 8.3 standard. Then, each 12 characters is cut off and stored in its own directory section. The directory entries that make up the long filename are called LFN entries. These must be backwardly compatible with MS-DOS programs and with MS-DOS itself.

NOTE
Windows takes the first six characters (no spaces) of the filename, adds a tilde (~), a number, and then the extension. If two or more files have the same first six characters, the number is incremented by one for each. For example, two files named "long file name one.txt" and "long file name two.txt" would become "longfi~1.txt" and "longfi~2.txt".

To make LFNs compatible with MS-DOS means to make sure that MS-DOS ignores the LFN entries in the directory structure. This is achieved by giving LFN entries the bizarre attribute-combination of hidden, read-only, system, and volume label. There is nothing in the MS-DOS code that tells it what to do if it runs into a file with this combination of attributes, so MS-DOS will not interfere with them.

CAUTION
Older disk utilities are incompatible with long filenames and will try to erase the LFN entries. It is critical that any disk utility that tries to diagnose the directory structure, including the SCANDISK that is included with MS-DOS 6 and earlier, should never be run on a computer with LFNs. The SCANDISK that comes with Win 95 is compatible with LFNs.

The Registry

The main difference between Windows 95 and Windows 3.x is the Registry. The Registry consists of two binary files called SYSTEM.DAT and USER.DAT that are located in the Windows directory. Because they are hidden read-only files, they are prevented from being accidentally removed or changed. The Registry holds information on all the hardware in the computer, network information, user preferences, and file types, as well as anything else that pertains to Windows 95. The idea of the Registry is to have one common database for everything that comprises the computer. The Registry is designed to replace CONFIG.SYS and AUTOEXEC.BAT, as well as every .INI file (especially WINDOWS.INI and SYSTEM.INI). Windows 95 still reads these files at boot up to provide backward compatibility with Win 3.x programs that use them.