Ftype command in Windows
The ftype command displays or modifies the file types used in file name extension links. If used without the assignment operator (=), the ftype command will display the current string of open commands for the specified file type. If used without parameters, the ftype command will display the file types with the specified sequence of commands.
For an example of how to use this command, please see the example below.
Cu ftype ordinance
ftype [[=[]]]
Parameters
ParametersDescription Specifies the file type to display or change. Specify the open command string to use when opening files of the specified file type. /? Show help at the command prompt.Note
The following table describes how the ftype command replaces the variables in an open command string:
Variable Replace value% 0 or% 1 Replaced with the file name that is launched via the link. % * Get all parameters. % 2,% 3, . Take the first parameter (% 2), the second parameter (% 3), etc. .% ~ Get all the remaining parameters starting with the Nth parameter, in where N can be any number from 2 to 9.For example
To display the current file types with defined command sequences, enter:
ftype
To display the current open command string for the txtfile file type, enter:
ftype txtfile
This command produces the following result:
txtfile=%SystemRoot%system32NOTEPAD.EXE %1
To delete the open command string for a file type called Example, enter:
ftype example=
To link the .pl file name extension to the PerlScript file type and allow PerlScript file type to run PERL.EXE, enter the following commands:
assoc .pl=PerlScript ftype PerlScript=perl.exe %1 %*
To eliminate the need to type the .pl file name extension when calling a Perl script, type:
set PATHEXT=.pl;%PATHEXT%
See more:
- Fondue command in Windows
- Findstr command in Windows
- Freedisk command in Windows
You should read it
Maybe you are interested
What to do when open command window here does not appear?
How to switch users on the Linux command line
How to fix Mac Homebrew error 'zsh: command not found: brew'
What is the Command key on Windows?
How to use read command in Linux
Basic Linux commands everyone needs to know - Operations on Linux are much faster