I get syntax error while trying to run multiple statements within conditional if of batch script
@echo off
set COMMITTIME=%date:~-4%-%date:~-7,2%-%date:~-10,2%-%time:~-11,2%-%time:~-8,2%-%time:~-5,2%
setlocal enabledelayedexpansion
set COMMITTIME=!COMMITTIME:^ =0!
setlocal disabledelayedexpansion
if %time:~-11,2% LEQ 5 (
echo NB /b
echo Who /b
echo ok)
echo %time:~-11,2%
if %time:~-11,2% GTR 5 (
echo Normal /b
echo menot /b
echo NOK)
::Nightly build time is less than 5 Am CET
if %time:~-11,2% LEQ 15(
echo ERROR commiting ec_baic /b
echo ERROR commiting ec_baic /b
echo ERROR commiting ec_baic)
In the batch script below first two conditional if works but the third conditional if yeids systex error
13
Normal /b
menot /b
NOK
The syntax of the command is incorrect.