Maybe, maybe not, but it sure seems so? It probably has to do with my oddball choice of escape character.
But basically, both test4.bat and test5.bat should execute without error.
But test5.bat does not.
The only difference between the two is that i continue my "if" statement more than once in test5.bat.
It seems that *my* escape character can't be used twice on the same if statement.
(And yes, I've quintuple-checked that the escape character is actually the last character of each line it is used on)
But basically, both test4.bat and test5.bat should execute without error.
But test5.bat does not.
The only difference between the two is that i continue my "if" statement more than once in test5.bat.
It seems that *my* escape character can't be used twice on the same if statement.
(And yes, I've quintuple-checked that the escape character is actually the last character of each line it is used on)
Bash:
C:\>test4
C:\>test5
test5.bat [6] Usage : IF [/I] [NOT] condition [.AND. | .OR. | .XOR. [NOT] condition ...] command
TCC: test5.bat [7] Unknown command "foo"
TCC: test5.bat [10] Unknown command ")"
TCC: test5.bat [13] Unknown command ")"
Bash:
@echo off
REM test4.bat
set PARAM2=foo
if "%PARAM2%" eq "skip_validation_existence" .or. "%PARAM2%" eq "skip_existence_validation" .or. ±
"%PARAM2%" eq "skip_validation" (
set SKIP_VALIDATION_EXISTENCE=1
set USER_MESSAGE=%3$
) else (
REM at this point, %2 must be a custom user message
set SKIP_VALIDATION_EXISTENCE=0
)
Bash:
@echo off
REM test5.bat
set PARAM2=foo
if "%PARAM2%" eq "skip_validation_existence" .or. ±
"%PARAM2%" eq "skip_existence_validation" .or. ±
"%PARAM2%" eq "skip_validation" (
set SKIP_VALIDATION_EXISTENCE=1
set USER_MESSAGE=%3$
) else (
REM at this point, %2 must be a custom user message
set SKIP_VALIDATION_EXISTENCE=0
)
Last edited: