Code: Select all
@echo off
rem ============================================================
rem CLRadio.bat
rem command line digital radio
rem mikehirst
rem 10:27 15 December 2009
rem N.B. requires mplayer - http://www.mplayerhq.hu/
rem ============================================================
SETLOCAL ENABLEEXTENSIONS
SETLOCAL ENABLEDELAYEDEXPANSION
:menuLOOP
cls
echo.
echo.= CLRadio ===============================================
echo.
for /f "tokens=1,2,* delims=_ " %%A in ('"findstr /b /c:":menu_" "%~f0""') do echo. %%B %%C
set choice=
echo.&set /p choice=Make a choice or hit ENTER to quit: ||GOTO:EOF
echo.&call:menu_%choice%
GOTO:menuLOOP
::-----------------------------------------------------------
:: menu functions with playlist urls
::-----------------------------------------------------------
:menu_1 Radio 1
start cmd /c mplayer -playlist http://www.bbc.co.uk/radio/listen/live/r1.asx
GOTO:EOF
:menu_1x Radio 1Xtra
start cmd /c mplayer -playlist http://www.bbc.co.uk/radio/listen/live/r1x.asx
GOTO:EOF
:menu_2 Radio 2
start cmd /c mplayer -playlist http://www.bbc.co.uk/radio/listen/live/r2.asx
GOTO:EOF
:menu_3 Radio 3
start cmd /c mplayer -playlist http://www.bbc.co.uk/radio/listen/live/r3.asx
GOTO:EOF
:menu_4 Radio 4
start cmd /c mplayer -playlist http://www.bbc.co.uk/radio/listen/live/r4.asx
GOTO:EOF
:menu_4lw Radio 4 LW
start cmd /c mplayer -playlist http://www.bbc.co.uk/radio/listen/live/r4lw.asx
GOTO:EOF
:menu_5 Radio 5 Live
start cmd /c mplayer -playlist http://www.bbc.co.uk/radio/listen/live/r5l.asx
GOTO:EOF
:menu_5se Radio 5 Live Sports Extra
start cmd /c mplayer -playlist http://www.bbc.co.uk/radio/listen/live/r5lsp.asx
GOTO:EOF
:menu_6 Radio 6
start cmd /c mplayer -playlist http://www.bbc.co.uk/radio/listen/live/r6.asx
GOTO:EOF
:menu_7 Radio 7
start cmd /c mplayer -playlist http://www.bbc.co.uk/radio/listen/live/r7.asx
GOTO:EOF
:menu_ws World Service
start cmd /c mplayer -playlist http://www.bbc.co.uk/worldservice/meta/tx/nb/live/www15.ram
GOTO:EOF
:menu_manc Radio Manchester
start cmd /c mplayer -playlist http://www.bbc.co.uk/radio/listen/live/bbcmanchester.asx
GOTO:EOF
:menu_suff Radio Suffolk
start cmd /c mplayer -playlist http://www.bbc.co.uk/radio/listen/live/bbcsuffolk.asx
GOTO:EOF
Best Wishes
Mike