2007-12-27, 10:21 AM
Sorry if this is the wrong thread.
I'm looking to write a RecordingStatus.bat file to update my LCD display.
Part of the code is shown below
set count=1
Rem Check current recordings
for /F "tokens=1 delims=#" %%a in ('gbpvrcli.exe /inprogress /mes "{Title}"') do (
if "%count%" == "4" echo %%a > lcd/fourth.txt
if "%count%" == "3" echo %%a > lcd/third.txt
if "%count%" == "2" echo %%a > lcd/second.txt
if "%count%" == "1" echo %%a > lcd/first.txt
set /a count=count+1
echo %count%
)
if "%count%" == "5" goto five
REM Less than 4 recordings got. Pad missed files
The aim is to get upto four recordings listed into four separate files and then display on the LCD, however I need to handle when there are less than 4 recordings active which requires me to keep a count of how many I have.
Currently count only ever has a value of 1. It never seems to be incremented.
Any ideas from the batch experts out there?
I'm looking to write a RecordingStatus.bat file to update my LCD display.
Part of the code is shown below
set count=1
Rem Check current recordings
for /F "tokens=1 delims=#" %%a in ('gbpvrcli.exe /inprogress /mes "{Title}"') do (
if "%count%" == "4" echo %%a > lcd/fourth.txt
if "%count%" == "3" echo %%a > lcd/third.txt
if "%count%" == "2" echo %%a > lcd/second.txt
if "%count%" == "1" echo %%a > lcd/first.txt
set /a count=count+1
echo %count%
)
if "%count%" == "5" goto five
REM Less than 4 recordings got. Pad missed files
The aim is to get upto four recordings listed into four separate files and then display on the LCD, however I need to handle when there are less than 4 recordings active which requires me to keep a count of how many I have.
Currently count only ever has a value of 1. It never seems to be incremented.
Any ideas from the batch experts out there?