how could i know whether a variable has been defined in command line?

  • Thread starter Thread starter thinktwice
  • Start date Start date
T

thinktwice

//file 1.bat
@call file3.bat

//file 2.bat
@call file1.bat
@call file3.bat

//file3.bat
if variable_a has been defined (goto eof ) else (define variable_a)

i don't want to run the same batch file more than once.
 
thinktwice said:
//file 1.bat
@call file3.bat

//file 2.bat
@call file1.bat
@call file3.bat

//file3.bat
if variable_a has been defined (goto eof ) else (define variable_a)

i don't want to run the same batch file more than once.

if defined variable_a echo the value of variable_a is %variable_a%
 
Back
Top