In
computing
Computing is any goal-oriented activity requiring, benefiting from, or creating computer, computing machinery. It includes the study and experimentation of algorithmic processes, and the development of both computer hardware, hardware and softw ...
, a file association associates a file with an
application capable of opening that file. More commonly, a file association associates a class of files (usually determined by their
filename extension
A filename extension, file name extension or file extension is a suffix to the name of a computer file (for example, .txt, .mp3, .exe) that indicates a characteristic of the file contents or its intended use. A filename extension is typically d ...
, such as
.txt
) with a corresponding application (such as a
text editor
A text editor is a type of computer program that edits plain text. An example of such program is "notepad" software (e.g. Windows Notepad). Text editors are provided with operating systems and software development packages, and can be used to c ...
).
Associations and verbs
A single file extension may have several associations for performing various actions, also known as verbs. Some of the common verbs are:
* ''open'' to open a file
* ''edit'' to open a file for editing
* ''print'' to print a file
A
picture
An image or picture is a visual representation. An image can be two-dimensional, such as a drawing, painting, or photograph, or three-dimensional, such as a carving or sculpture. Images may be displayed through other media, including a proje ...
, for example, may be associated with these words so that ''open'' opens the picture in an
image viewer, ''edit'' opens up an
image editing
Image editing encompasses the processes of altering images, whether they are Digital photography, digital photographs, traditional Photographic processing, photo-chemical photographs, or illustrations. Traditional analog image editing is known ...
program and ''print'' sends the picture to a printer.
Implementations
Most
operating systems
An operating system (OS) is system software that manages computer hardware and software resources, and provides common daemon (computing), services for computer programs.
Time-sharing operating systems scheduler (computing), schedule tasks for ...
support file associations in some form or the other. For example, opening a file from a file manager usually invokes the ''open'' verb in order to open the file with its associated application. The "open" verb invokes the associated
application program
Application software is any computer program that is intended for end-user use not operating, administering or programming the computer. An application (app, application program, software application) is any program that can be categorized as ...
, which reads the file or document and presents it to the user for viewing, and possibly for editing or other action.
Additional actions such as ''print'' are usually accessed via a right-click
context menu
A context menu (also called contextual, shortcut, and pop up or pop-up menu) is a menu in a graphical user interface (GUI) that appears upon user interaction, such as a right-click mouse operation. A context menu offers a limited set of choic ...
. A mechanism for modifying associations is also usually present. An example for this is the ''Open With'' option in the
Windows Shell
The Windows shell is the graphical user interface for the Microsoft Windows operating system. Its readily identifiable elements consist of the desktop, the taskbar, the Start menu, the task switcher and the AutoPlay feature. On some versions of ...
.
Microsoft Windows
The
Microsoft Windows
Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
series of
operating system
An operating system (OS) is system software that manages computer hardware and software resources, and provides common daemon (computing), services for computer programs.
Time-sharing operating systems scheduler (computing), schedule tasks for ...
s, beginning with
Windows 3.x supports file extension-based associations. Associations are stored in
registry as sets of verbs for each file extension. Older versions supported ''open'' associations stored in
WIN.INI.
File associations can be displayed and edited using the
assoc
command
Command may refer to:
Computing
* Command (computing), a statement in a computer language
* command (Unix), a Unix command
* COMMAND.COM, the default operating system shell and command-line interpreter for DOS
* Command key, a modifier key on A ...
and with the help of the
ftype
command it is possible to create association between file type and application which will open files of this type.
The Windows shell invokes file association actions through
COM, drag and drop, command line calls or through
Dynamic Data Exchange. Advanced features of Microsoft Windows file associations included manually defining a new file extension with any number of associated actions, a primary ''default action'', showing extensions only for specific file types, customizing the file type icon and description and customizing associated
MIME
A mime artist, or simply mime (from Greek language, Greek , , "imitator, actor"), is a person who uses ''mime'' (also called ''pantomime'' outside of Britain), the acting out of a story through body motions without the use of speech, as a the ...
type and their handling (how to handle file types for files downloaded or directly opened from within the
Internet Explorer
Internet Explorer (formerly Microsoft Internet Explorer and Windows Internet Explorer, commonly abbreviated as IE or MSIE) is a deprecation, retired series of graphical user interface, graphical web browsers developed by Microsoft that were u ...
browser). The ability to configure advanced file association functionality, however, was removed in
Windows Vista
Windows Vista is a major release of the Windows NT operating system developed by Microsoft. It was the direct successor to Windows XP, released five years earlier, which was then the longest time span between successive releases of Microsoft W ...
and later operating systems.
Linux
Linux
Linux ( ) is a family of open source Unix-like operating systems based on the Linux kernel, an kernel (operating system), operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically package manager, pac ...
-based GUIs, such as
KDE
KDE is an international free software community that develops free and open-source software. As a central development hub, it provides tools and resources that enable collaborative work on its projects. Its products include the KDE Plasma gra ...
and
GNOME
A gnome () is a mythological creature and diminutive spirit in Renaissance magic and alchemy, introduced by Paracelsus in the 16th century and widely adopted by authors, including those of modern fantasy literature. They are typically depict ...
, support
MIME type-based associations. For example, the MIME type
text/plain
would be associated with a
text editor
A text editor is a type of computer program that edits plain text. An example of such program is "notepad" software (e.g. Windows Notepad). Text editors are provided with operating systems and software development packages, and can be used to c ...
. This association is generally accomplished through the
freedesktop.org Shared MIME database (for determining the MIME type of a file) and the
Desktop Entry specification (for determining which application to open the file with).
Mac OS
The
Classic Mac OS
Mac OS (originally System Software; retronym: Classic Mac OS) is the series of operating systems developed for the Mac (computer), Macintosh family of personal computers by Apple Computer, Inc. from 1984 to 2001, starting with System 1 and end ...
used
type code
A resource fork is a fork of a file on Apple's classic Mac OS operating system that is used to store structured data. It is one of the two forks of a file, along with the data fork, which stores data that the operating system treats as unstruct ...
s and
creator code
A creator code is a mechanism introduced in the classic Mac OS to link a data file to the application program which created it. The similar type code held the file type, like "TEXT". Together, the type and creator indicated what application shou ...
s to associate each file with its corresponding application, regardless of file extension. The more recent
macOS
macOS, previously OS X and originally Mac OS X, is a Unix, Unix-based operating system developed and marketed by Apple Inc., Apple since 2001. It is the current operating system for Apple's Mac (computer), Mac computers. With ...
also supports file extension–based associations.
Application bundles in macOS declare supported file types in their Info.plist file. For each of these specified types, a
Uniform Type Identifier is given, along with a list of 'tags' which define how a file or data of this type could be identified. For example, the
JPEG
JPEG ( , short for Joint Photographic Experts Group and sometimes retroactively referred to as JPEG 1) is a commonly used method of lossy compression for digital images, particularly for those images produced by digital photography. The degr ...
type is defined with a UTI of 'public.jpeg', and tagged with the extensions 'jpg' and 'jpeg', the
MIME
A mime artist, or simply mime (from Greek language, Greek , , "imitator, actor"), is a person who uses ''mime'' (also called ''pantomime'' outside of Britain), the acting out of a story through body motions without the use of speech, as a the ...
type 'image/jpeg' and the
type code
A resource fork is a fork of a file on Apple's classic Mac OS operating system that is used to store structured data. It is one of the two forks of a file, along with the data fork, which stores data that the operating system treats as unstruct ...
'JPEG'.
Mac OS X Reference Library - Uniform Type Identifier Concepts
/ref>
The operating system uses this information to generate a list of applications which are able to open each type. Within Finder (software)
The Finder is the default file manager and graphical user interface shell used on all Macintosh operating systems. Described in its "About" window as "The Macintosh Desktop Experience", it is responsible for the launching of other applications, ...
each file will be identified with a UTI and open with the default application for that type. The user may also select from a list of other applications which support the type.
Using this system, types are also associated with data for which there is no file name or the file extension is missing. This includes pasteboard data and data streaming over a protocol such as HTTP
HTTP (Hypertext Transfer Protocol) is an application layer protocol in the Internet protocol suite model for distributed, collaborative, hypermedia information systems. HTTP is the foundation of data communication for the World Wide Web, wher ...
where a MIME type has been given.
See also
*File format
A file format is a Computer standard, standard way that information is encoded for storage in a computer file. It specifies how bits are used to encode information in a digital storage medium. File formats may be either proprietary format, pr ...
*Filename extension
A filename extension, file name extension or file extension is a suffix to the name of a computer file (for example, .txt, .mp3, .exe) that indicates a characteristic of the file contents or its intended use. A filename extension is typically d ...
References
Further reading
#
#
{{DEFAULTSORT:File Association
Metadata