ECHO command in batch file -


i new batch programming, facing 1 issue in below batch script.

rem   set var1=10 set var2=20  set var3 = john  set var4 = john1  echo variable values  echo %var1% echo %var2% echo %var3% echo %var4%  /f "tokens=1,2 delims=\\ " %%a in ("%1") set component=%%a&set app=%%b  pause exit 

the issue stated below,

the statements echo %var3%, echo %var4% ==> won't produce desired result print string value assigned to. instead in prints echo on.

not sure issue. know trivial please help.

%var3% not equal %var3%. so, %var3%==" john" , %var3%=="". when call echo empty parameter, prints current echo mode (on or off).

also set var3 = john not equal set var3=john. first command means 'create variable "var3 " (i.e. it's name consists of 5 characters - fifth space) value " john"' (it's values starts space). try add following lines in script see it:

echo %var3 % echo %var4 % 

Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -