Help with --command syntax
Peter S Kirk
peter.kirk at isauk.biz
Thu Oct 23 16:25:01 PDT 2014
On 23 Oct 2014 at 19:38, Vangelis forthnet Vangelis forthnet
<northmedia1 at the.forthnet.gr> wrote:
> On Wed Oct 22 20:50:10 BST 2014, I wrote:
>
> > But if I, somehow, tell GiP to run the command
> > I originally posted:
> >
> > cmd /k "cd /d "F:\Downloads\FLVtoMP4remux" & "remux.bat" ^&& exit"
> >
> > that "cd"s to where both the EXEs & .bat are found,
> > I'd expect it should work.
>
> Just for the history of it, and prior to dp's reply,
> my "experiments" continued and I finally ended up
> with a rustic but working solution.
> I created a new batch file, called "RunExtBat1.bat"
>
> --------------------------------------------
> @echo off
> REM *** Run External Batch File ***
> REM *** CD to where .bat is found ***
> cd /d "F:\Downloads\FLVtoMP4remux"
> REM *** Execute .bat ***
> CALL "remux.bat"
> :END
> --------------------------------------------
>
> I have write access to GiP's installation directory,
> so for convenience I placed it there.
>
> I then used this GiP command:
>
> get_iplayer --pid=p026knvh --modes flashstd --force --raw --outputtv
> "F:\Downloads\FLVtoMP4remux" -c RunExtBat1.bat
>
> It seemed to have done the job, but:
> remux.bat towards the end of its execution
> requires user input (plus it contains 3
> PAUSE lines); I wasn't able to interact with
> the GiP console window, so I had to kill it...
> I then edited the code of remux.bat to not
> require user input & removed all PAUSE lines.
> Renamed it to remux1.bat & also edited
> RunExtBat1.bat to call remux1.bat ; my
> objective was then accomplished.
>
> Upon further checking the net for alternative
> solutions, I bumped on the "start" command;
> To cut it short, RunExtBat2.bat was created,
> similar to RunExtBat1.bat but its penultimate line reads:
>
> start cmd /k CALL "remux.bat" ^& exit
>
> Adding -c RunExtBat2.bat to the GiP command,
> opens (the original version of ) remux.bat in a new
> command prompt window, which now accepts
> my input...
>
I'm sure you already know this, but others may not. For inputs to a batch
file create a .txt with the inputs and
example.bat < inputs.txt
For a list you can use %n and then shift command to move to next
eg a cli: example.bat pid=1234 pid=1235 pid=1236
:start
record %1
if errorlevel=<forget> goto end
shift
goto start
:end
exit
P
More information about the get_iplayer
mailing list