1. Computing & Technology

Windows Files and Folders: File extensions

There are two main classes of file types on a computer: program files and data files. Program files are files that actually do something. Data files are the files created by those programs, usually by the user. For example, Microsoft Word is a word processing program with hundreds of files that allow it to work. When a user creates a document using Microsoft Word, it is a data file created in Word.

File types are defined by their extension. This three letter indicator at the end of a filename is solely responsible for letting the computer know what type of file it is, what program it is associated with, and how it should be handled. Using our Notepad example above, if we were to go to Start | Programs | Accessories | Notepad, we would be telling Windows to launch the Notepad shortcut (.lnk file), which in turn would open Notepad. However, if we were to go directly to the setuplog.txt file and open it, the .txt extension would tell Windows it was a Notepad file. In turn, Windows would open Notepad and display the setuplog.txt file within it.

All versions of the Windows operating system, by default, suppress file extension viewing. This is perhaps one of the worst decisions Microsoft has ever made, as it allows any number of viruses to use very basic tricks to entice users into opening files they should not or normally would not.

This problem comes into play because a filename accepts multiple periods. While a typical filename might be filename.txt there is nothing that prevents it from being file.name.txt. Thus, if a virus writer named a file filename.jpg.exe, only filename.jpg would appear to the user. This makes it appear as if the file were actually an image, when in fact it’s an executable. Windows has simply hidden the ‘real’ file extension from view.

The File Extension Center provides a step-by-step guide to configuring Windows so that file extensions are always displayed and provides a list of common executables that should be avoided in email.

Next page > File Extension Center > Page 1, 2, 3, 4

More in this series:

©2012 About.com. All rights reserved.

A part of The New York Times Company.