Code: Select all
@echo off
set /a x=1
set test=hello
if %x% equ 1 (
set test=
call :setupText Hi
call :setupText There, this works
)
echo %test%
goto :EOF
:setupText
set test=%test% %*
goto :EOF
Code: Select all
@echo off
set /a x=1
set test=hello
if %x% equ 1 (
set test=
call :setupText Hi
call :setupText There, this works
)
echo %test%
goto :EOF
:setupText
set test=%test% %*
goto :EOF