A+ Certification / Beginners

Identifying File-Naming Conventions

File-naming conventions have undergone several changes over the years. In this section, you get a look at where they have been and where they are now. You also take a look at the differences between filenames and directory entries.

When MS-DOS was the premier operating system (OS) on the market, it set the standard of what is referred to as the eight dot three (8.3) -character filename. This file system was created by using 32 character fields (bytes) for the filenames. If you work out the math, you're probably wondering where the extra characters are. Well, 8 plus 3 is 11, and that leaves 21 outstanding characters (bytes). Table below summarizes how each byte is used.

The File Allocation Table (FAT) is an index on your file system that holds a pointer to where each file is stored on your hard drive. On an NTFS file system, this is called the Master File Table (MFT). To move a file on a file system, you only need to change its reference in the table, and not it's location in the file system.

Directory Entry Format
Use 		Size
Filename 	8 bytes
Extension 	3 bytes
Attribute 	1 byte
Reserved 	10 bytes - FAT 32 uses two of these bytes.
Time 		2 bytes
Date 		2 bytes
First Cluster 	2 bytes
Size 		4 bytes

Tip: With every system or component used in a computer, there is a limit; sometimes it is a very large limit, but still limited. That limit is always based on a binary number. Computer systems have RAM limits of 2, 4, 8, or 16 GB, never 7.5 GB, since it is not a binary number. The binary number system is also referred to as Base 2, as opposed to our traditional number system which is Base 10. Common Base 2 numbers are determined by their digits, for instance, a 4 digit Base two number would have a maximum value of 1111 or 8+4+2+1 or 15, and if they include a 0000 as possible value, then there are 16 possible values from 0 to 15. When you count the number of possible values for 1 digit to 12 digit Base 2 numbers, the value limits you end up with are 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, and 4096. In cases where the limit is not based on a binary number, then there is usually some overhead involved. NetBIOS computer names are 15 characters long; but they fit into the binary system, as there is a 16th character that is used to identify the type of name, and 16 is a common binary limit. Filenames are 8 plus 3 characters long, which is only 11 characters or bytes in length, but the name is only part of a directory entry, and the entire entry is 32 bytes long.

When dealing with file attributes, one byte (8 bits) stores all attribute settings. (For more information on file attributes, see the section "Understanding File Attributes," later in this tutorial.) There are not, however, eight attributes. The 8.3-character naming convention quickly proved to be very limiting. Extensions were often used to allow for longer names and were not directly associated with individual applications. When Windows came onto the market, people began using file extensions properly. Within Windows, the extension was used to identify the application that created a particular document.

Other OSes placed different limits on the length of filenames. Macintosh (before OS/2) limited the length of filenames to 31 characters, and OS/2 limited them to 254 characters. While 8.3 was very limiting, 254 characters seems excessive, but you likely won't be limited in your choice of filenames.

[Contents] [Next]