Page 1 of 1

Association de fichiers / File Association

Posted: 29 Feb 2004 10:15
by Nick667
Bonjour à tous

Serait il possible, ou est-il prévu pour la version windows d'ajouter une partie permettant d'associer VLC aux fichiers de médias dans les options ?

Merci d'avance

---------

Hi everyone

Is it possible, or is it planned to add a section allowing to associate VLC with media files in the windows version ?

Thanks

Posted: 29 Feb 2004 10:25
by Sigmund
It is possible and it's wanted by several people, but it's not planed. Most likely this will first appear in the installer, but noone seems to be very interrested in working on it.

Might not be too tough...

Posted: 04 Mar 2004 03:56
by markfm
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.

Thanks you markfm!

Posted: 19 Jun 2007 19:52
by guptavis
Sorry for bringing up a 3 year old topic, but it is a really great one!
a lot of people have the same problem and they could really benefit from this information by markfm.

i had the same problem for so long and was almost about to quit vlc when i found this great solution!
i would recommend putting this topic in the sticky or FAQ.