File Types: The Link Between Documents and Applications
The term file types describes the collection of associations between documents and the applications that use them. The most apparent use of this feature is that, for example, Windows knows to run Notepad when you double-click on a text document in Explorer (proof that Windows XP is not truly object oriented).
True object-oriented design dictates that objects (in this case, files and folders) be aware of their own traits. This design is only mimicked in Windows XP. Instead of each file knowing which application is used to edit it, Windows determines how to handle a file based solely on the filename extension. This design has advantages and disadvantages, but Microsoft's decision to hide filename extensions, the basis for file associations, only makes the whole system more difficult to understand and master.
It all starts with file extensions, the letters (usually three) that follow the period in most filenames. For example, the extension of the file Readme.txt is .txt, signifying a plain-text file; the extension of Resume.wpd is .wpd, signifying a document created in WordPerfect. By default, Windows hides the extensions of registered file types in Explorer and on the desktop, but it's best to have them displayed.
File extensions not only allow you to easily determine what kind of file a certain file is (because icons are almost never descriptive enough), but also allow you to change Windows's perception of the type of a file ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access