Page 1 of 1

%verbose% usage

Posted: 09 Jun 2011 08:50
by alanbitell1
got some code here, im struggling as i dont know batch files too well, what does the %verbose% part of the code do? bearing in mind that the file is called from another bat file like so

Code: Select all

call ld50.bat "bass_boost_p8_47048_01_01_rc0.uld"  exitonerror


Code: Select all

REM CS49500 DSP boot batch file
REM call with file to be dowloaded as command line argument
REM $Id: ld50.bat,v 1.1 2009/07/28 18:01:42 jhilbert Exp $

if exist "%1" goto LOAD
echo Error: the '%1' file does not exist
goto error

:LOAD
if "%verbose%"=="1" echo Initiate Slave Boot
ucmd 80000000

if "%verbose%"=="1" echo Reading Boot Start
urd -e"00 00 00 01"
if errorlevel 1 goto error

echo sending overlay %1
ucmd -f%1

if "%verbose%"=="1" echo Reading Boot Success
urd -e"00 00 00 02"
if errorlevel 1 goto error

:end
rem Normal return (no error)
exit /b 0

:error
rem Return error
if "%2" == "" pause
exit /b 1


Thanks in advance

Re: %verbose% usage

Posted: 09 Jun 2011 09:06
by Ed Dyreen

the %verbose% does nothing, as it is expanded into nothing

Code: Select all

if ""=="1" echo Initiate Slave Boot
ucmd 80000000

Re: %verbose% usage

Posted: 09 Jun 2011 10:00
by dbenham
The developer of the script wanted the option of printing out diagnostic messages that describe the current status of the batch process.

By default, no diagnostic messages are printed because verbose <> 1. If you want to see the diagnostics than issue SET VERBOSE=1 prior to calling the batch file.

Dave Benham