Wednesday, February 27, 2008

Changing File Associations from the Command Prompt

Usually you change the file associates from the Explorer.

An easy way to do it from the cmd prompt is by using the assoc and ftype commands

Assoc shows you the extension file type and it's name.
For example assoc .txt displays .txt=textfile

Ftype lets you change the file assocation
For example ftype txtfile displays txtfile=%SystemRoot%\system32\NOTEPAD.EXE %1

To change the program you want to use for a txtfile, simply type:

ftype txtfile=the location of the other program

No comments: