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 Server 2012. Windows 8.1. Windows Server 2012 R2. Windows 10. Windows Server 2016. Windows Server 2019.
PTC MKS Toolkit for System Administrators
PTC MKS Toolkit for Developers
PTC MKS Toolkit for Interoperability
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
PTC MKS Toolkit 10.3 Documentation Build 39.