if statement or if satement
Posted: 18 Dec 2023 15:53
Hi all,
I got a struggle of this two if statement while I try to add another condition on the previous code.
Original code is as below:
Now I try to add another or if statement IF NOT "!RDL_TYPE_NAME!"=="!RDL_TYPE_NAME:TKI=!"
as below
I tried both or, | none is working frome above code
I got a struggle of this two if statement while I try to add another condition on the previous code.
Original code is as below:
Code: Select all
if defined RDL_TYPE_NAME (
call:UpCase RDL_TYPE_NAME
IF NOT "!RDL_TYPE_NAME!"=="!RDL_TYPE_NAME:KIA=!" (
ECHO Skipping !RDL_TYPE_NAME!
set RDL_TYPE_NAME=
goto :endOfProcessing
) else (
call:ErrorPrompt "ERROR31: Download option is not available. Package creation failed ^!"
call:ClearBeforeBreak "error"
set /A ERRORC=31
goto :exit
)
)
as below
Code: Select all
if defined RDL_TYPE_NAME (
call:UpCase RDL_TYPE_NAME
IF NOT "!RDL_TYPE_NAME!"=="!RDL_TYPE_NAME:KIA=!" or IF NOT "!RDL_TYPE_NAME!"=="!RDL_TYPE_NAME:TKI=!" (
ECHO Skipping !RDL_TYPE_NAME!
set RDL_TYPE_NAME=
goto :endOfProcessing
) else (
call:ErrorPrompt "ERROR31: Download option is not available. Package creation failed ^!"
call:ClearBeforeBreak "error"
set /A ERRORC=31
goto :exit
)
)