I have included 4 players:
Windows Media Player (default), XMplay, K-lite's Media Player Classic and Winamp.
Uncomment the one you want to use.
Notes:
1) You can select both folders and files in one go, the script will automatically include files inside the folders in the play list.
2) I have included only few audio extensions, you can add more audio/video extensions if you want.
3) The number of files you can include in playlist depends on how long your paths are. Shorter paths=more files.
Code: Select all
////PlayWithMedia
//Play selected files/folders with media player(s)
// NOTE: a) Adjust paths to the players accordingly at step 4).
// b) Add/Remove extensions at step 3).
//1) Set variables
focus;
end (<get CountSelected> ==0, "Nothing selected");
$files="";
$char=chr(34);
//2) Loop selected items
foreach($folder, <get selecteditemspathnames |>) {
IF(exists($folder)==2){
$files= $files.folderreport("files", "r", $folder, "r", ,"|");
}
ELSE{
$files=$files.|$folder;
}
}
//3)Add/Remove extensions (separate with |) and format file list
$showext="*.wma|*.mp3|*.ogg|*.m4a";
$files=formatlist($files,"f","|","$showext");
end ($files=="");
$files=$char.replace($files,"|","$char $char").$char;
//4) Open files with media player (remove // before "open" to use that player. Default is WMP)
//(A) WMP
open """C:\Program Files\Windows Media Player\wmplayer.exe"" $files";
//(B) XMplay
//open """C:\Program Files\XMplay\xmplay.exe"" $files";
//(C) K-lite's Media Player Classic
//open """C:\Program Files\K-Lite Codec Pack\Media Player Classic\mpc-hc.exe"" $files";
//(D) Winamp
//open """C:\Program Files\Winamp\winamp.exe"" $files";