How do I run multiple get_iplayer commands from a single .bat file?
#6
If it's of any use, this is the script I run nightly via the task scheduler:

Code:
cd C:\Program Files (x86)\get_iplayer
set $batchFile="D:\iPlayer Recordings\Batch.txt"
set $logFile="D:\iPlayer Recordings\PVR-log.txt"
call get_iplayer --type=tv,radio --refresh

(echo.
echo ------------------------------------------------------------
echo ---------      %time%    %date%       ---------
echo ------------------------------------------------------------
echo.) >>%$logFile%

if exist %$batchFile% (
    echo Batch file import started
    
    ( echo.
    echo Batch file import started
    echo. ) >>%$logFile%
    
    for /f "delims=" %%a in ('type %$batchFile%') do (
        echo Batch checking %%a >>%$logFile%
        call get_iplayer --get --quiet --whitespace %%a >>%$logFile%
        )

    echo. >>%$logFile%
    ) else (
    echo.
    echo No batch file import
    echo.
    ) >>%$logFile%
    
call get_iplayer --pvr --quiet --whitespace 2>>%$logFile%

move "D:\iPlayer Recordings\*.mp4" "D:\iPlayer Recordings\Downloaded\"
move "D:\iPlayer Recordings\*.m4a" "D:\iPlayer Recordings\Downloaded\"

It reads a text file (Batch.txt) containing the programme names that it should look for and download. An example of the content there would be:

Code:
"Les Miserables"
"New Wild"
"Slipstream" --type=radio

My set-up is both this and the built-in PVR. I have the PVR set for "long term" stuff that I always want to download, and I use the batch file for individual series of stuff like that so I don't have to mess around with the PVR too much, plus I can remotely access and edit the batch.txt file easily when I'm travelling and want to set something to be grabbed.

Everything is logged to the log file, and then once downloaded it's moved to the downloaded folder out of the way.


Messages In This Thread
RE: How do I run multiple get_iplayer commands from a single .bat file? - by DarrenHill - 01-02-2019, 10:02 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Ashamed to admit - how do I put commands in ? dieselweasel 2 2,519 01-11-2017, 10:03 PM
Last Post: dieselweasel
  WebPVR: How to exclude common single word programme names? MrArtist 3 3,588 22-01-2017, 01:23 AM
Last Post: dinky
  BBC PID download single or multiple Robbie 3 3,650 02-11-2014, 10:22 AM
Last Post: Robbie