File association

In computing, 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, such as `.txt`) with a corresponding application (such as a text editor).

## Contents

* 1 Associations and verbs
* 2 Implementations
* 2.1 Microsoft Windows
* 2.2 Linux
* 2.3 Mac OS
* 3 See also
* 4 References
* 5 Further reading

## 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, for example, may be associated with these words so that open opens the picture in an image viewer, edit opens up an image editing program and print sends the picture to a printer.

## Implementations

Most operating systems 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, 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 mechanism for modifying associations is also usually present. An example for this is the Open With option in the Windows Shell.

### Microsoft Windows

The Microsoft Windows series of operating systems, beginning with Windows 3.x supports file extension-based associations.[1] Associations are stored in registry[2] 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 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.[3][4]

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 type and their handling (how to handle file types for files downloaded or directly opened from within the Internet Explorer browser). The ability to configure advanced file association functionality, however, was removed in Windows Vista and later operating systems.

### Linux

Linux-based GUIs, such as KDE and GNOME, support MIME type-based associations.[citation needed] For example, the MIME type `text/plain` would be associated with a text editor. 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).[5]

### Mac OS

The Classic Mac OS used type codes and creator codes to associate each file with its corresponding application, regardless of file extension. The more recent macOS 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 type is defined with a UTI of 'public.jpeg', and tagged with the extensions 'jpg' and 'jpeg', the MIME type 'image/jpeg' and the type code 'JPEG'.[6]

The operating system uses this information to generate a list of applications which are able to open each type. Within Finder 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 where a MIME type has been given.

## See also

* File format
* Filename extension

## References

1. ↑ "Windows 3.x Features". http://www.fandecheng.com/personal/interests/ewindows/windows3x/features.htm.
2. ↑ HKEY_CLASSES_ROOT Key
3. ↑ Microsoft TechNet Assoc article on `assoc`
4. ↑ Microsoft TechNet Ftype article on `ftype`
5. ↑ "Association between MIME types and applications". https://specifications.freedesktop.org/mime-apps-spec/latest/.
6. ↑ Mac OS X Reference Library - Uniform Type Identifier Concepts

## Further reading

1. "Implementing a Custom File Format". Microsoft Developer Network Library. Microsoft Corporation. 9 November 2010. http://msdn.microsoft.com/en-us/library/ff521657(v=VS.85).aspx.
2. "File Associations". KDE Documentation. KDE. 11 November 2016. https://docs.kde.org/stable5/en/kde-workspace/kcontrol5/filetypes/index.html.

* v
* t
* e

Windows command-line programs and shell builtins

* COMMAND.COM
* Command Prompt
* Windows PowerShell
* Recovery Console

File system navigation|

* cd (chdir)
* dir
* popd
* pushd
* tree

File management|

* attrib
* cacls
* cipher
* compact
* copy
* del (erase)
* deltree
* expand
* icacls
* makecab
* mkdir (md)
* mklink
* move
* recover
* ren (rename)
* replace
* rmdir (rd)
* robocopy
* tar
* xcopy

Disk management|

* chkdsk
* convert
* defrag
* diskcomp
* diskcopy
* diskpart
* drvspace
* fdisk
* format
* label
* manage-bde
* subst
* scandisk
* sys
* vol
* vssadmin

Processes|

* at
* exit
* kill
* powercfg
* runas
* sc
* schtasks
* shutdown
* start
* taskkill
* tasklist

Registry|

* assoc
* ftype
* reg
* regini
* regsvr32

User environment|

* date
* mode
* path
* set
* setx
* time
* title
* ver
* whoami

File contents|

* comp
* edit
* edlin
* fc
* find
* findstr
* print
* type

Scripting|

* choice
* clip
* cscript
* doskey
* echo
* for
* forfiles
* goto
* if
* more
* pause
* prompt
* rem
* timeout

Networking|

* arp
* BITSAdmin
* cURL
* getmac
* hostname
* ipconfig
* net
* netsh
* netstat
* nslookup
* PathPing
* ping
* route
* scp
* sftp
* ssh
* ssh-add
* ssh-agent
* ssh-keygen
* ssh-keyscan
* tracert
* winrm
* winrs

Maintenance and care|

* driverquery
* eventcreate
* eventtriggers
* msiexec
* ntbackup
* sfc
* systeminfo
* w32tm
* WBAdmin
* winsat
* wmic

Boot management|

* bcdedit
* bootcfg
* fixboot
* fixmbr

Software development|

* debug
* exe2bin
* QBasic

Miscellaneous|

* cls
* dism
* dpath
* gpupdate
* help
* MSCDEX
* pentnt
* wsl

* List of DOS commands
* Environment variables

0.00

(0 votes)

Original source: https://en.wikipedia.org/wiki/File association. Read more

|

Retrieved from "https://handwiki.org/wiki/index.php?title=File_association&oldid=4348262"
*[v]: View this template
*[t]: Discuss this template
*[e]: Edit this template