JSI Tip 0108 - Manage file associations from the command line.

Jerold Schulman

April 13, 1997

1 Min Read
ITPro Today logo in a gray background | ITPro Today

Two commands, ASSOC and FTYPE, allow you to manage file associations from a command prompt (or in a batch file).

Typing ASSOC, without parameters, displays the currently defined extensions. Type Assoc .wav to display the .wav file association. Typing assoc .wav= will delete the .wav association.

Typing FTYPE without options displays the file types that have defined open command strings. Ftype SoundRec will display the open command string for the file type SoundRec. Typing ftype SoundRec= will delete the open command string.

To define a new association for .log files which you want to open with notepad:

assoc .log=LogFile
ftype LogFile=%Systemroot%System32otepad.exe %1

For a complete explanation, type ftype /? at a command prompt.


Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like