Online Book Reader

Home Category

CompTIA A_ Certification All-In-One Exam Guide, Seventh Edition - Michael Meyers [246]

By Root 1417 0
and piece of data as an individual file. Each file has a name, which is stored with the file on the drive. Windows inherits the idea of files from older operating systems—namely DOS—so a quick review of the old-style DOS filenames helps in understanding how Windows filenames work. Names are broken down into two parts: the filename and the extension. In true DOS, the filename could be no longer than eight characters, so you’ll often see oddly named files on older systems. The extension, which is optional, could be up to three characters long in true DOS, and most computer programs and users continue to honor that old limit, even though it does not apply to modern PCs. No spaces or other illegal characters (/∴[]| ÷+=;,*?) could be used in the filename or extension. The filename and extension are separated by a period, or dot. This naming system was known as the 8.3 (eight-dot-three) naming system.

Here are some examples of acceptable true DOS filenames:

Here are some unacceptable true DOS filenames:

I mention the true DOS limitations for a simple reason: backward compatibility. Starting with 9x, Windows versions did not suffer from the 8.3 filename limitation. Instead they supported filenames of up to 255 characters (but still with the three-character extension) by using a trick called long filenames (LFN). Windows systems using LFN retained complete backward compatibility by automatically creating two names for every file, an 8.3 filename and a long filename. Modern Windows using NTFS works almost exactly the same way as LFNs.

Whether you’re running an ancient DOS system or the latest version of Windows Vista, the extension is very important, because the extension part of the filename tells the computer the type or function of the file. Program files use the extension .EXE (for executable) or .COM (for command). Anything that is not a program is some form of data to support a program. Different programs use different types of data files. The extension usually indicates which program uses that particular data file. For example, Microsoft Word uses the extension .DOC (.DOCX for Microsoft Office Word 2007), while WordPerfect uses .WPD and PowerPoint uses .PPT (.PPTX for Microsoft Office PowerPoint 2007). Graphics file extensions, in contrast, often reflect the graphics standard used to render the image, such as .GIF for CompuServe’s Graphics Interchange Format or .JPG for the JPEG (Joint Photographic Experts Group) format.

Changing the extension of a data file does not affect its contents, but without the proper extension, Windows won’t know which program uses it. You can see this clearly in My Computer. Figure 15-9 shows a folder with two identical image files. The one on top shows the Photoshop icon, which is the program Windows will use to open that file; the one on the bottom shows a generic icon because I deleted the extension. Windows GUI doesn’t show file extensions by default. Figure 15-10 shows the contents of that same folder from the command line.

All files are stored on the hard drive in binary format, but every program has its own way of reading and writing this binary data. Each unique method of binary organization is called a file format. One program cannot read another program’s files unless it can convert the other program’s format into its format. In the early days of DOS, no programs were capable of performing this type of conversion, yet people wanted to exchange files. They wanted some type of common format that any program could read. The answer was a special format called American Standard Code for Information Interchange (ASCII).

Figure 15-9 What kind of file is the one on the lower right?

Figure 15-10 One file has no extension.

The ASCII standard defines 256 eight-bit characters. These characters include all of the letters of the alphabet (uppercase and lowercase), numbers, punctuation, many foreign characters (such as accented letters for French and Spanish—é, ñ, ô—and other typical non-English characters), box-drawing characters, and a series of special characters for commands

Return Main Page Previous Page Next Page

®Online Book Reader