(0) exportieren Drucken
Alle erweitern
Arp
At
Cd
Cls
Cmd
Del
Dir
Fc
For
Ftp
If
Ldp
Lpq
Lpr
Md
Mmc
Msg
Nlb
Rcp
Rd
Reg
Rem
Ren
Rsh
Rsm
Rss
Sc
Set
Sfc
Ver
Vol
Erweitern Minimieren
Dieser Artikel wurde noch nicht bewertet - Dieses Thema bewerten.

Ftype

Letzte Aktualisierung: September 2007

Betrifft: Windows Server 2008, Windows Vista

Displays or modifies file types that are used in file name extension associations. If used without an assignment operator (=), ftype displays the current open command string for the specified file type. If used without parameters, ftype displays the file types that have open command strings defined.

For examples of how to use this command, see Examples.

Syntax

ftype [<FileType>[=[<OpenCommandString>]]]

Parameters

 

Parameter Description

<FileType>

Specifies the file type to display or change.

<OpenCommandString>

Specifies the open command string to use when opening files of the specified file type.

/?

Displays help at the command prompt.

Remarks

The following table describes how ftype substitutes variables within an open command string:

 

Variable Replacement value

%0 or %1

Gets substituted with the file name being launched through the association.

%*

Gets all of the parameters.

%2, %3, ...

Gets the first parameter (%2), the second parameter (%3), and so on.

%~<N>

Gets all of the remaining parameters starting with the Nth parameter, where N can be any number from 2 to 9.

Examples

To display the current file types that have open command strings defined, type:

ftype

To display the current open command string for the txtfile file type, type:

ftype txtfile

This command produces output similar to the following:

txtfile=%SystemRoot%\system32\NOTEPAD.EXE %1

To delete the open command string for a file type called Example, type:

ftype example=

To associate the .pl file name extension with the PerlScript file type and enable the PerlScript file type to run PERL.EXE, type the following commands:

assoc .pl=PerlScript 
ftype PerlScript=perl.exe %1 %*

To eliminate the need to type the .pl file name extension when invoking a Perl script, type:

set PATHEXT=.pl;%PATHEXT%

Additional references

Fanden Sie dies hilfreich?
(1500 verbleibende Zeichen)
Vielen Dank für Ihr Feedback.

Community-Beiträge

HINZUFÜGEN
Anzeigen:
© 2014 Microsoft. Alle Rechte vorbehalten.