Code: Select all
@echo on & SET RR="Value" & IF DEFINED RR (echo Value Detected & pause >nul) else (echo Nada Value & pause >nul) & pause >nul
The line runs fine except it breaks before the statement after the else block. However, reversing the condition:
Code: Select all
@echo on & SET RR="Value" & IF NOT DEFINED RR (echo Value Detected & pause >nul) else (echo Nada Value & pause >nul) & pause >nul
The code assembles fine, but now the last statement is executed. It's becoming increasingly apparent that even with the assistance of \n, getting "one-line" code to work with parentheses in System() is becoming rather a challenge.
Has anyone any insights to share here? Thanks.