Purpose:Modify or display the command used to open a file of a type specified in the Windows registry


Format:FTYPE [/= /P /R[filename] | filetype[=[command]]


filenameOne or more input files to read file type definitions from.
filetypeA file type stored in the Windows registry.
commandThe command to be executed when a file of the specified type is opened.



/R(ead from file)


See also: ASSOC, ASSOCIATE, and Executable Extensions.




FTYPE allows you to display or update the command used to open a file of a specified type stored in the Windows registry.


FTYPE modifies the behavior of Windows file associations stored under the registry handle HKEY_CLASSES_ROOT, and discussed in more detail under Windows File Associations. If you are not familiar with file associations be sure to read about them before using FTYPE.


The entry modified by FTYPE is the Shell\Open\Command entry for the specified file type, which defines the application to execute when a file of that type is opened. The open action is generally invoked by selecting Open on the popup menu for a file from the Windows Explorer. Note that opening a file and double-clicking its icon (or selecting the icon and pressing Enter) may not be the same thing. Double-clicking or pressing Enter invokes the default action for the file type, which may or may not be Open.


If you invoke FTYPE with no parameters, it will display the current file types and associated shell open commands. Use the /P switch to pause the display at the end of each page. If you include a filetype, with no equal sign or command, FTYPE will display the current command for that file type.


If you include the equal sign and command, FTYPE will create or update the shell open command for the specified file type. The command generally includes an application name, including full path, plus parameters. The specific syntax required depends on the internal operation of both Windows and the application involved, and is beyond the scope of this help file. You can learn about typical syntax by reviewing appropriate Windows and application documentation, and / or by checking through the current contents of your registry. If the value contains the percent mark character %, the value stored will be type REG_EXPAND_SZ, otherwise it will be type REG_SZ.


To remove the shell open command for a file type, use a command like FTYPE filetype=, with no command parameter. This will not delete the shell open command entry from the registry; it simply sets the command to an empty string.


FTYPE should be used with caution, and only after backing up the registry. Improper changes to file associations can prevent applications and / or the operating system from working properly.




/=Display the FTYPE command dialog to help you set the command line options. The /= option can be anywhere on the line; additional options will set the appropriate fields in the command dialog.


/PWait for a key to be pressed after each screen page before continuing the display. Your options at the prompt are explained in detail under Page and File Prompts.


/RThis option loads a list of file types and associated shell open commands. If no filename is specified and the input is redirected, FTYPE will read from stdin. The format of the file is the same as that of the FTYPE display.


You can insert comments in the file by prefixing the line with a colon (:).


/UDisplay or set the association in HKCU\Software\Classes.