Filename extension

related topics
{math, number, function}
{system, computer, user}
{language, word, form}
{law, state, case}

A filename extension is a suffix to the name of a computer file applied to indicate the encoding convention (file format) of its contents.

In some operating systems (for example Unix) it is optional, while in some others (such as DOS) it is a requirement. Some operating systems limit the length of the extension (such as DOS and OS/2, to three characters) while others (such as Unix) do not. Some operating systems (for example RISC OS) do not use filename extensions. Unix accepts the separator dot as a legal character but does not give it a special recognition on the OS level.

Contents

Usage

Filename extensions can be considered a type of metadata. They are commonly used to infer information about the way data might be stored in the file. The exact definition, giving the criteria for deciding what part of the file name is its extension, belongs to the rules of the specific filesystem used; usually the extension is the substring which follows the last occurrence, if any, of the dot character (e.g. txt is the extension of the filename readme.txt, html the extension of mysite.index.html). On file systems of mainframe systems such as MVS, VMS, and PC systems such as CP/M and derivative systems such as MS-DOS, the extension is a separate namespace from the filename. Under Microsoft's DOS and Windows, some extensions, including EXE, COM, BAT, CMD, and VBS indicate that a file is an executable program. This is different from UNIX-like operating systems, where a suffix is not a separate namespace, and where even having a suffix is voluntary, as file system permissions are used to decide whether a file is executable.

With the advent of graphical user interfaces, the issue of file management and interface behavior arose. Microsoft Windows allowed multiple applications to be associated with a given extension, and different actions were available for selecting the required application, such as a context menu offering a choice between viewing, editing or printing the file.

Pre-OS X versions of the Mac OS disposed of filename extensions entirely, instead using a file type code to identify the file format. Additionally, a creator code was specified to determine which application would be launched when the file's icon was double-clicked. Mac OS X, however, uses filename suffixes, as well as type and creator codes, as a consequence of being derived from the UNIX-like NEXTSTEP operating system, which did not have type or creator code support in its file system.

Full article ▸

related documents
Common Object Request Broker Architecture
Maildir
Berkeley sockets
Wikipedia:Free On-line Dictionary of Computing/C - D
Object-relational mapping
GNU Compiler Collection
Java Virtual Machine
YUV
TeX
Active Directory
Classless Inter-Domain Routing
Stream cipher
Threaded code
MIME
PHP
AppleScript
SPARC
List of computing topics
Wikipedia:Database download
Bzip2
GRASS (programming language)
Jackson Structured Programming
Scalable Vector Graphics
Windows API
Header file
Atari BASIC
Big5
Visual Basic for Applications
X86 memory segmentation
AmigaDOS