get_iplayer and Windows batch files

Vangelis forthnet northmedia1 at
Mon Jan 16 10:41:03 EST 2012

On Sun Jan 15 23:30:07 GMT 2012, Shevek wrote:

>I have a batch script set up to run daily using Windows task scheduler.
>The trick is that by default .pl files are not associated to anything
>under windows (they are, I assume, under Linux), so you have to
>actually call perl.exe and pass as an argument and then
>the arguments for get_iplayer.

 You are right; that is exactly what the "get_iplayer.cmd" file inside the
installation folder does. If opened with notepad (right click -> Edit), you 

@echo off
perl.exe %*

 So, in terms of a batch file context,


is the same as

CALL get_iplayer

>This is my script which downloads multiple programmes of both TV and
>Radio. When I want to add anything I simply add it to the list at line
>4 for TV and line 6 for Radio:

 I mostly download radio. I used to be an ipdl (Paul Battley's one) user,
where one would only need to provide a programme's pid (off the iPlayer 
for that programme to be downloaded...
  More as a "batch file writing" exercise, I've written a .bat to download 
radio shows
with get_iplayer by simply providing a pid; I've named the file 
and placed it inside my downloads folder ("D:\Vangelis\iPlayer 
I am just running it from there...
Content of the GetRadioProgramme.bat file follows (this is for a Win 32bit 

@echo off
REM *** CD to get_iplayer's installation folder ***

cd /d "C:\Program Files\get_iplayer\"

REM *** Refresh Radio Cache ***

CALL get_iplayer --type=radio --refresh dontshowanymatches
echo *** Download Radio Programme via its pid ***
SET /P PID="Paste pid, then press ENTER "

get_iplayer --type=radio -i --pid=%PID% --modes=flashaac --force -w --tag-podcast-radio


One can use one's personalised flavour of the get_iplayer command, with 
additional options and their arguments...
Of course, using the standard route I can just type e.g.

get_iplayer --type=radio --pid=b019dmzb

1. I may have to first wait for the TV cache to be refreshed (default 
behaviour, can be changed...)
2. type everytime any additional options/arguments or, if don't want that, 
add them in my personal options
with get_iplayer --prefs-add
Anyhow, already said I did it as an exercise, possibly someone finds it 

Cheers, Vangelis.

More information about the get_iplayer mailing list