1

I'm using HotStarLiveStreamer https://github.com/biezom/hotstarsportslivestreamer and I'm having trouble understanding how I can modify the .bat file script to suit my purposes.

    @ echo off
call set /p link=paste the link:
call set last=%%link:~-1,1%% 
call set folder="%~dp0\videos\\"
call set livestreamer="%~dp0\tools\livestreamer\\"
call "%~dp0\tools\php5.4\php.exe" hotstarlivestreamer.php "%%link%%"
IF  %last% NEQ c GOTO:nocollection
call set /p id=enter the Id of the video (example write 1000021386):
call "%~dp0\tools\php5.4\php.exe" hotstarlivestreamer.php "%%link%%" "%%id%%"
call set /p quality=write quality (example write 720p):
call "%~dp0\tools\php5.4\php.exe" hotstarlivestreamer.php "%%link%%" "%%id%%" "%%quality%%" "%%folder%%" "%%livestreamer%%"
GOTO end1
:nocollection
call set /p quality=write quality (example write 720p):
call set /p choice=play or download? (write p or d):
call "%~dp0\tools\php5.4\php.exe" hotstarlivestreamer.php "%%link%%" "%%quality%%" "%%folder%%" "%%livestreamer%%" "%%choice%%"
:end1
pause
:end

The things I want to do:

1) Change folder to a folder on an external hard drive: M:\LiveStreamer; the software is currently in the root of the C:

2) Have it automatically input it as 720p

call set /p quality=write quality

3) Have it automatically input 'd' for call set /p choice=play or download? (write p or d):

Thanks

2
  • What is the folder it currently saves it to on your c drive? Im looking at the batch file and trying to get an idea of what it is already doing I have a partial idea but want to confirm it. Feb 24, 2016 at 8:59
  • @NetworkKingPin It saves to C:\hotstarsportslivestreamer\videos Apr 5, 2016 at 18:16

1 Answer 1

2

Try like this :

@echo off
call set /p link=paste the link:
call set last=%%link:~-1,1%% 
rem call set folder="%~dp0\videos\\"
set folder=M:\\LiveStreamer
If Not Exist %folder% MD %folder%
call set livestreamer="%~dp0\tools\livestreamer\\"
call "%~dp0\tools\php5.4\php.exe" hotstarlivestreamer.php "%%link%%"
IF  %last% NEQ c GOTO:nocollection
call set /p id=enter the Id of the video (example write 1000021386):
call "%~dp0\tools\php5.4\php.exe" hotstarlivestreamer.php "%%link%%" "%%id%%"
call set /p quality=write quality (example write 720p):
call "%~dp0\tools\php5.4\php.exe" hotstarlivestreamer.php "%%link%%" "%%id%%" "%%quality%%" "%%folder%%" "%%livestreamer%%"
GOTO end1
:nocollection
rem call set /p quality=write quality (example write 720p):
Set quality=720p
rem call set /p choice=play or download? (write p or d):
set choice=d
call "%~dp0\tools\php5.4\php.exe" hotstarlivestreamer.php "%%link%%" "%%quality%%" "%%folder%%" "%%livestreamer%%" "%%choice%%"
:end1
pause
:end
6
  • Wonderful, this works perfectly. Feb 18, 2016 at 1:13
  • The only issue I'm having is that it saves to the M: drive directly and not into the folder. (realized this after I went outside the 5 minutes editing time for the above post) Feb 18, 2016 at 1:20
  • @Serenity_Life ==> So your isn't solved yet ? Did you create a folder named : M:\LiveStreamer or not ?
    – Hackoo
    Feb 18, 2016 at 15:00
  • Yes, I tried both creating the folder and letting the cmd create the folder and both don't work. It just goes into the root of the M:\ Feb 18, 2016 at 15:15
  • 1
    Nope, that didn't work either. But it's okay, the important part was getting it to the external HD and automating it. I can just move it to the appropriate folder. Thank you so much for the help though!! Feb 19, 2016 at 16:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .