Skip navigation

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

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%\System32\notepad.exe %1

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

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.