I'm having some trouble understanding how to call a batch function without having problem with delayedExpansion
the error i get is
) was unexpected at this time.
after few searches i understood it's because of the enabled delayed expansion, but i don't get how to handle it.
@echo off
Setlocal EnableDelayedExpansion
set RUN_MODE=%1
set STRING=%2
if %RUN_MODE%==1 (
echo %STRING%
if "%STRING%"=="empty" (
:dontDo
)
:doSomething
:dontDo
)
goto:eof
:doSomething
echo doingSomething
goto:eof