Ftype
Displays or modifies file types used in file name extension associations. Used without parameters, ftype displays the file types that have open command strings defined.
Syntax
Ftype [FileType[=[OpenCommandString]]]
Parameters
FileType : Specifies the file type you want to display or change.
OpenCommandString : Specifies the open command to use when opening files of this type.
/? : Displays help at the command prompt.
Remarks
-
Within an OpenCommandString, ftype substitutes the following variables:
-
%0 or %1 are replaced with the file name that you want to open.
-
%* is replaced with all of the parameters.
-
%~ n is replaced with all of the remaining parameters, starting with the nth parameter, where n can be any number from 2 to 9.
-
%2 is replaced with the first parameter, %3 with the second, and so on.
-
Examples
To display the current file types that have open command strings defined, type:
ftype
To display the current open command string for a specific file type, type:
ftype FileType
To delete the open command string for a specific file type, type:
ftype FileType=
Type:
ASSOC .pl=PerlScript FTYPE PerlScript=perl.exe %1 %*
To invoke the Perl script, type:
script.pl 1 2 3
To eliminate the need to type the extensions, type:
set PATHEXT=.pl;%PATHEXT%
To invoke the Perl script, type:
script 1 2 3
Formatting legend
|
Format |
Meaning |
|---|---|
|
Italic |
Information that the user must supply |
|
Bold |
Elements that the user must type exactly as shown |
|
Ellipsis (...) |
Parameter that can be repeated several times in a command line |
|
Between brackets ([]) |
Optional items |
|
Between braces ({}); choices separated by pipe (|). Example: {even|odd} |
Set of choices from which the user must choose only one |
|
Courier font |
Code or program output |


