assoc [extension [filetype]]
The assoc command sets up an association between a file name extension (for example, .pl) and a file type. File type names are associated with a command to execute using the ftype command. When specifying a file name extension, you may omit the leading period (that is, ksh is the same as .ksh).
With no arguments, assoc displays all file name extension associations in two tab delimited columns. The first column is the file name extension, and the second the name of the file type from the ftype command.
With one argument, the single association for the file name extension given is displayed.
With two arguments, a new file name extension association is created, or a current one is replaced.
The following example first uses assoc to associate the .ksh file name extension with the mks_shell file type, and then uses ftype to set the command to be run for that file type.
assoc .ksh mks_shell ftype mks_shell "wstart -Nm sh.exe -H -- \"%L\" %*"
Possible exit status values are:
ftype and assoc are named after similar commands built into cmd.exe.
This command is actually implemented as a MKS KornShell script, changing the appropriate registry entries using the registry command. MKS cannot be responsible for proper functionality of this code if you alter the assoc.ksh file in any way.
Windows 2000. Windows XP. Windows Server 2003. Windows Vista. Windows 7. Windows Server 2008. Windows 8. Windows Server 2012.
MKS Toolkit for System Administrators
MKS Toolkit for Developers
MKS Toolkit for Interoperability
MKS Toolkit for Professional Developers
MKS Toolkit for Enterprise Developers
MKS Toolkit for Enterprise Developers 64-Bit Edition
MKS Toolkit 9.5 Documentation Build 3.