Tech Tips / Windows NT / Disk and File Management
Users sometimes accidentally associate the wrong application with a file. Two commands, ASSOC and FTYPE, allow you to correct this problem by managing file associations from a command prompt (or in a batch file).
Typing assoc, without parameters, displays the currently defined file 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. Enter ftype SoundRec to 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 that you want to open with Notepad, use the following syntax:
assoc .log=LogFile ftype LogFile=%Systemroot%\System32\notepad.exe %1
You can use a combination of these command-line utilities in a batch file or to re-associate files across your network if you run it as a logon script. For more information, type ftype /? at the command prompt.
If you're an experienced IT professional and would like to share your expertise with other Setup32.com readers, why not submit a new tip to our Tech Tips area?
Certification Links