G53OPS - Operating Systems

This course is run at the The University of Nottingham within the School of Computer Science & IT. The course is run by Graham Kendall (EMAIL : gxk@cs.nott.ac.uk)


File Extensions

In many operating systems (typically operating systems which run on PC's) the filename is made up of two parts; separated by a full stop. The part of the filename up to the full stop is the actual filename. The part following the full stop is often called a file extension.

In MS-DOS the extension is limited to three characters. Under UNIX and Windows 95/NT they can be longer.

File extensions are used to tell the operating system what type of data the file contains. Or, to put it another way, the file extension associates the file with a certain application so that if the user opens the file using the default application then the operating system knows which application to load.

As an example, under the Windows environment a file with an extension of 'DOC' is likely to be a file that was created by Microsoft Word. If the user double clicks on the file then the operating system (by virtue of the registry in the case of Windows 95/98/NT) knows that a file extension of 'DOC' is associated with the Microsoft Word Processor.

But, there are no hard and fast rules. Using tools provided with the operating system (Explorer in the case of Windows 95/98/NT) the user is able to change the file associations. Many users will change the file association for the 'TXT' file extension. By default these files (ASCII text files) will be opened by an operating system supplied program called Notepad, which is a simple text editor. Many users would prefer to edit text files using their word processor because it provides many more facilities. Therefore, they change the file association of 'TXT' so that the default application is the word processor.

There are no restrictions as to what can be done (at least under Windows) so users can change whatever they like although some changes would not make sense, for example, opening a file that contains a bit mapped image using Notepad.

UNIX allows a file to have more than one extension associated with it. That is a filename can have more than one period in it. This allows filenames of the form life.c.z. This is likely to be a C program that has been compressed using a suitable program (e.g. gzip).

Some common file extensions are shown below; although there are hundreds (if not thousands) more.

Extension File Contents
BIN Binary File
C C Program File
CPP C++ Program File
DLL Dynamic Link Library
DOC MS Word File
EXE Executable File
HLP Help File
TXT Text File
XLS Microsoft Excel File

 

Last Page Back to Main Index Next Page

 

 


 Last Updated : 23/01/2002