CompTIA A_ Certification All-In-One Exam Guide, Seventh Edition - Michael Meyers [246]
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