get_iplayer and Windows batch files

Jon Davies jon at hedgerows.org.uk
Mon Jan 16 04:14:04 EST 2012


On 15 January 2012 17:55, Clive <clivebuc at gmail.com> wrote:
> ...In Windows, I
> have tried using batch files in the past ... I have found that it does not work.
> The batch file runs get_iplayer and the first item is duly d/l but then I am returned to
> the command prompt and the second and subsequent batch lines never run. Is
> there a way to use get_iplayer from batch files (or from the Linux
> equivalent) for multiple items?


In your batch script just put "call" in front of get_iplayer thus:

call get_iplayer ...

The reason you see the behaviour is that on windows (only) get_iplayer
is a batch file, and the design of the command processor in windows is
such that running another batch file replaces the existing one.  To
resolve this you "call" a batch file, and then control returns to the
calling script afterwards.

Cheers
Jon

A couple of references if you want to understand more:
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/batch.mspx?mfr=true
http://www.robvanderwoude.com/call.php



More information about the get_iplayer mailing list