I looking for a way using windows batch file that call sub-batch file which pass 1-9 parameters and return value (string) without the need of saving the return value into fi
Small TIP
Setlocal EnableDelayedExpansion IF 1==1 ( CALL :LABEL echo 1: %errorlevel% echo 2: !errorlevel! ) echo 3: %errorlevel% :LABEL EXIT /B 5
Output will be:
1: 0 2: 5 3: 5
EnableDelayedExpansion allows you to use !var_name! to expand var at execution time, rather then parse time.