Freigeben über


Assoc

Displays or modifies file name extension associations. Used without parameters, assoc displays a list of all the current file name extension associations.

Syntax

assoc [.ext[=[filetype]]]

Parameters

. ext   : Specifies the file name extension.

filetype   : Specifies the file type with which you want to associate the specified file name extension.

/?   : Displays help at the command prompt.

Remarks

  • Use a white space after the equal sign to delete the file type association for a file name extension.

  • Use the ftype command to view current file types that have open command strings defined.

  • Use the > redirection operator to redirect the output of assoc to a text file.

Examples

To view the current file type association for the file name extension .txt, type:

assoc .txt

To delete the file type association for the file name extension .txt, type:

assoc . txt =

To view current file type associations one screen at a time, type:

assoc | more

To send the output of assoc to the file Assoc.cfg, type:

assoc>assoc.cfg

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

Ftype

More

Start

Command-line reference A-Z

Using command redirection operators