Postby markfm » 04 Mar 2004 03:56
at a shell level, the basic commands to create a file association are just two lines:
assoc .xyz=WhateverFileType
ftype WhatEverFileType=c:\PathToMyApplication\MyApp.exe the_qualifiers
If you have Windows, at a DOS prompt typing "assoc" will show the current list of file associations -- what Windows has been told to call the various suffixes (e.g., that a .jpg is a "JPEG"), Typing "ftype" will show what is to be done with each file that's registered.
To generate a file association set, you 1) pick what file extensions you want to have VLC auto-open (.avi, .mpg, .div,...), 2) pick the names you wish to call these extensions (e.g., you might declare that .mpg is MPEGMovie), 3) log register the file extensions with "assoc" statements, then 4) generate the command lines from the ftype statement.
For the "ftype" statements, %1 = the input buffer, the filename you have clicked on.
Gotchas (things to be careful about):
If the path to vlc.exe includes spaces, include quotes around it -- "C:\Program Files\VLS\vlc.exe"
Some programs like quotes around the name of a file they are to open, otherss don't. In other words, you generate an ftype command saying to launch vlc, the command line that you type in the ftype statement may include either %1 OR "%1" -- depends on how the vlc command-line parser works.