I get a lot of e-mail that begins with the confession, "I know this is a dumb question, but ..." At which point the reader asks a perfectly good question about some aspect of computer technology. I got a bunch of those responses after a column about the "Love Bug" virus, in which I blithely told readers to be on the lookout for e-mail attachments with file names that ended with the extension "VBS."
The messages typically began, "I know this is a dumb question, but what's an extension?"
That reminded me once again that no infant ever emerged from the womb with a knowledge of Microsoft's operating system, and that many readers had probably never seen an extension in the first place. This is a shame, because a basic understanding of this little piece of trivia can make your computing life easier and protect you against bad guys like the Love Bug.
So here's a Computing 101 class in file extensions.
First things first: A file is a collection of information on your hard drive (or CD-ROM or floppy disk). You'll see these files listed when you click on My Computer and use Windows Explorer to open a folder.
There are two kinds of files --program files such as "Doom" or Microsoft Word, and data files, which are used by those programs. The letter you wrote to Grandma Jenny last week is a data file used by Word. A digital photo of your cousin Ben is a data file used by a photo editor.
Obviously, your computer needs some way to distinguish programs from data files. It also has to know which data files go with which programs.To deal with this issue, system designers separated file names into two parts. The first is the name of the file, which presumably means something to you, the user. The second is an extension, usually separated from the file name by a period. The extension can tell you what kind of file you're looking at. More importantly, it tells your computer what program Windows should use to open it.
Some file extensions are obvious, or at least easy to remember. For example, files with the extension TXT are simple text files that can be read by any text editor on almost any computer system. Microsoft Word, which owns the lion's share of the word processing market, uses the extension DOC, which is short for document.
This system works well with commonly used programs -- for example, if you see a file called "LetterToAuntBecky.doc" you can figure out what it contains without a Ph.D. in computer science. Alas, many file extensions are more obscure or even downright bizarre (JPG, GIF, PDF, XLS, etc.). They don't make sense till someone explains them.
Windows knows that certain file extensions represent programs. When you double-click on one of these, Windows loads it into memory and launches it. The most common extension for programs is EXE, an abbreviation for "executable," but there are others. For example, Windows will automatically launch old DOS batch files, which are basically lists of commands stored with the extension BAT. The Love Bug virus is a program written in a language called VBScript, which uses the extension VBS. Double-clicking on the Love Bug file, even when it's attached to an e-mail, is usually enough to launch the program and infect the computer.
Data files are handled differently. Windows keeps a database of system settings known as the Registry, including a record of the programs associated with different file extensions. For example, once you've installed Microsoft Word, clicking on any file with a DOC extension will start Word and load the file. Likewise, double-clicking on a TXT file will start up Notepad.
Instead of requiring users to memorize long lists of extensions to figure out what's on their disks, Microsoft made things easier. When you open a folder in Windows Explorer, it displays an icon, or picture, next to each file name. The icon displayed depends on the file's extension. All Word documents, for example, are displayed with an icon that features a big blue "W." This is an artistic device that Microsoft stole from the Mac operating system, which doesn't recognize extensions and relies completely on icons.
Unfortunately, Microsoft decided its users must be real simpletons, because it went a step further. By default, Windows Explorer hides file extensions, leaving only the file name and the icon. This is dangerous because a mislabeled file with the wrong icon is easy to miss, and loaded into the wrong program, it can cause a crash -- or at least a puzzling error message.
The subtle author of the Love Bug took advantage of this to trap knowledgeable users who stored the file on their hard drives to check it out before opening it. The virus file itself was named "LOVE-LETTER-FOR-YOU.TXT.vbs." The creator knew that Windows gets the file extension from the characters after the last period in the file name. So if Windows was set to hide file extensions, the virus would appear to be named "LOVE-LETTER-FOR-YOU. TXT," a normal text file. Unfortunately, users who double-