%verbose% usage

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
alanbitell1
Posts: 1
Joined: 09 Jun 2011 08:47

%verbose% usage

#1 Post by alanbitell1 » 09 Jun 2011 08:50

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

Ed Dyreen
Expert
Posts: 1569
Joined: 16 May 2011 08:21
Location: Flanders(Belgium)
Contact:

Re: %verbose% usage

#2 Post by Ed Dyreen » 09 Jun 2011 09:06


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

Code: Select all

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

dbenham
Expert
Posts: 2461
Joined: 12 Feb 2011 21:02
Location: United States (east coast)

Re: %verbose% usage

#3 Post by dbenham » 09 Jun 2011 10:00

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

Post Reply