Sinisterly
Help!! Play Music Playlist In Batch File - Printable Version

+- Sinisterly (https://sinister.li)
+-- Forum: Coding (https://sinister.li/Forum-Coding)
+--- Forum: Coding (https://sinister.li/Forum-Coding--71)
+--- Thread: Help!! Play Music Playlist In Batch File (/Thread-Help-Play-Music-Playlist-In-Batch-File)



Help!! Play Music Playlist In Batch File - INVAD3R - 12-30-2013

Hello I am new to batch coding but I am trying to play a music playlist from a folder and this is what I got so far

Start "" "%Userprofile%\Desktop\Files Others\The Weeknd\03 Echoes Of Silence\"

If I add one song after that it works but the problem here is that after 03 Echoes Of Silence\ I want to add multiple music but I can't, please help I am running a Windows 7.


RE: Help!! Play Music Playlist In Batch File - ninja805 - 12-30-2013

(12-30-2013, 08:53 AM)INVAD3R Wrote: Hello I am new to batch coding but I am trying to play a music playlist from a folder and this is what I got so far

Start "" "%Userprofile%\Desktop\Files Others\The Weeknd\03 Echoes Of Silence\"

If I add one song after that it works but the problem here is that after 03 Echoes Of Silence\ I want to add multiple music but I can't, please help I am running a Windows 7.

Hi INVAD3R! By making a music playlist in Batch, do you mean that there is a menu that a client/user can pick a song from? If so, do the following;

Code:
@echo off title Music Player color 0C :welcome cls echo Welcome! echo Type "MAID" to listen to 'Maid with the Flaxen Hair'. echo Type "KALI" to listen to 'Kalimba'. echo Type "EXIT" to exit the Music Player! :musicpick set /p var=Select Command: if %var%==KALI start Kalimba.mp3 if %var%==MAID start Maid.mp3 if %var%==EXIT exit goto musicpick

A problem with opening files via Batch is that if it incorporates a space like the following:

Code:
start Maid with the Flaxen Hair.mp3


Then it will not open. You must put the song in it's file destination OR you can have both files in a folder with the Batch code and do this:

Code:
start Maid.mp3

Without using the full destination of the .mp3 you have to shorten the song's name, if it incorporates spaces .. It will not work.

Hope this works! :Smile:

- Ninja