BATCH SCRIPTING// NESTED IF CONDITION // Batch Scripting Part -18- NESTED IF CONDITION

preview_player
Показать описание
Title: BATCH SCRIPTING// NESTED IF CONDITION // Batch Scripting Part -18- NESTED IF CONDITION

In this lesson, you will be learning about NESTED IF CONDITION for Batch Script.

NESTED IF CONDITION: Sometimes, there is a requirement to have multiple ‘if’ statement embedded inside each other. Following is the general form of this statement.

if(condition1) if (condition2) do_something
So only if condition1 and condition2 are met, the code in the do_something block be executed.

Following is an example of how the nested if statements can be used.

Example
@ECHO OFF

REM NESTED IF

SET /A A=10
SET /A B=5

IF %A%==10 IF %B%==5 ECHO THE IF CONDITION WORKS

PAUSE

OUTPUT:
THE IF CONDITION WORKS
=======================================================

If you have any questions, please post them. Don't forget to comment, like, rate and subscribe

=====================================================

======================================================
Check out other videos

Рекомендации по теме
Комментарии
Автор

Like the way you elaborate the topic. Nice. Thank you

snehrakeshgoel
join shbcf.ru