trying to do in a larger batch program. None of the paths are taken when i run it:
Code: Select all
@Echo Off
setlocal EnableDelayedExpansion
set "var1A=8A" & Set "var1B=8A"
Set "var2A=179" & Set "var2B=197"
echo vars:
set var
If not "!var1A!"=="!var1B!" If not "!var2A!"=="!var2B!" (
echo vars not duplicated within sets
) Else If "!var1A"=="!var1B!" (
echo var1A and var1B are duplicated
) Else If "!var2A!"=="!var2B!" (
echo var2A and var2B are duplicated
) Else (
echo took the ...else path
)
endlocal & exit /b