assoc


assoc

Displays or modifies file extension associations.

Syntax

 assoc [.   ext   [=[   filetype   ]]] 

Options

.ext

Specifies the file extension

filetype

Specifies the file type you want to associate with the specified file extension

Examples

Used without options, assoc displays a list of all current associations:

  assoc  .323=h323file .386=vxdfile .aca=Agent.Character.2 .acf=Agent.Character.2 .acs=Agent.Character2.2 .aif=AIFFFile .aifc=AIFFFile .aiff=AIFFFile .ani=anifile .asa=aspfile .asf=ASFFile .asp=aspfile . . . .xml=xmlfile .xsl=xslfile .zap=zapfile .ZFSendToTarget=CLSID\{888DCA60-FC0A-11CF-8F0F-00C04FD7D062} .zip=CompressedFolder 

A better way to do this is to redirect the current list of associations to a text file:

  assoc > assoc.txt  

and change the association for .xml files from XML documents ( xmlfile ) to text documents ( txtfile ):

  assoc .xml=txtfile  .xml=txtfile 

Now if you double-click on an XML document, it opens in Notepad instead of Internet Explorer.

Associate the extension .xxx with XML documents ( xmlfile ):

  assoc .xxx=xmlfile  .xxx=xmlfile 

View the newly created association:

  assoc .xxx  .xxx=xmlfile 

Remove the previously created association for .xxx files:

  assoc .xxx=  .xxx= 

Note there is a space after the equals sign.

Notes

  • To view or modify file associations in the GUI, use Windows Explorer:

    Windows Explorer Tools Folder Options File Types

  • To view file types with open command strings defined, use ftype instead.

See Also

Files and Folders , ftype



Windows Server 2003 in a Nutshell
Windows Server 2003 in a Nutshell
ISBN: 0596004044
EAN: 2147483647
Year: 2003
Pages: 415
Authors: Mitch Tulloch

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net