S2MP: Send files matching file type groups to media player of choice

S2MP (Send to Media Player)


A Directory Opus script to send files selected in the source file display which match a given file type group ("Music" & "Videos" by default) via M3U8 playlist to a media player of choice (VLC by default).

If a selected item is a directory, all files within it will be considered (recursive). Playlists containing absolute paths are created in the user's temporary directory (by default) as a means to send the files to a given media player.


To install the script, drag & drop the script file onto the list of scripts at Preferences > Toolbars > Scripts, enable the script, and add the code exec_s2mp to a Standard Function button script. Alternatively, paste the contents of the script directly into a button script (set Function to Script Function and its Type to JScript).


See the script's NOTE comments for some user configurable options (e.g. setting a custom media player).


As a quick guide, you can set up the script for use with fb2k by editing the variable which points to the media player's exe path (for default installations, use "C:\\Program Files (x86)\\foobar2000\\foobar2000.exe"), and then setting the args variable to "/immediate" (an argument which makes fb2k respond quicker to the files it is being sent). Finally, the button's icon can be changed by customising it and pointing it to fb2k's executable.


Select some music and/or video files and press the button to open them in VLC.


Check Opus' script log for any script output/errors.

Additional help: https://resource.dopus.com/t/how-to-use-buttons-and-scripts-from-this-forum/3546


Attached is the script and a pre-configured button which can be dragged to a toolbar when in toolbar customise mode.

s2mp_v0.1.1.js.txt (11.7 KB)
S2MP_button.dcf (766 Bytes)

Enjoy! :slightly_smiling_face:



  • Fix M3U8 playlist being written as UTF-16.
  • Other misc changes.


  • Initial release.