[quote author=Salmon Trout link=topic=92501.msg625699#msg625699 date=1253810618]
We do not know what your "do this" code does so cannot give detailed help. However, in a multi line IF structure, you need to use delayed expansion to set and read variables to work properly. You can Google for many pages about this.
[/quote]
Dear Salmon Trout,
Pls find the code,
How to handle multiple IF conditions in a batch scripting
Ex:-
For /f "tokens=5" %%i in (6.txt) do set ci=%%i
IF %ci% EQU 2 ( [b] first if start[/b]
For /f "tokens=3" %%i in (6.txt) do set Tl=%%i
set Th=%Tl:~0,2%
set Tm=%Tl:~3,2%
Set TL=%Th%%Tm%
For /f "tokens=2" %%j in (4.txt) do set Tj=%%j
set /A Clc=%Tf%-%TL%
set /A Day=%dt%-%Tj%
:del 4.txt
echo %clc%
echo %Day%
set bool=0
[i]IF "%clc%" GEQ "800" set /a yy=%yy%+1
IF "%Day%" GTR "1" set /a yy=%yy%+1
IF %yy% LEQ 2 (
taskkill /F /IM calc.exe
) ELSE (
taskkill /F /IM notepad.exe
)
)[/i] ELSE ( [b]first if end[/b]
echo Bye Bye
)
Pls advice,
Thanks in advance