Knowledge Walls
John Peter
Pune, Maharashtra, India
Things to Know [cont'd]
If Else in Decision making of MS-DOS Commands
12570 Views
IF Else  
If-Else is one of decision making statement. IF block of statements executed when the if condition is true otherwise executes ELSE block of statements.
How to use IF-Else with multiple statements
@echo off

set /p confirmDeploy=Confirm deployment of code [y/n] ?:
echo %confirmDeploy%

IF %confirmDeploy%==n (
   echo "n value"
) ELSE (
   echo "y value"
)
How to comare string with IF statement?
set /p file_name=Enter the filename:
if %file_name%==exit (
   echo Bye
)
Next Topics
Next lessons of current book.
File System of MS-DOS Commands
File System of MS-DOS Commands
Arithmetic Operators of MS-DOS Commands
Previous Topics
Previous lessons of current book.
Decision making of MS-DOS Commands
Decision making of MS-DOS Commands
Decision making of MS-DOS Commands
Things to Know of MS-DOS Commands
Best Lessons of "MS-DOS Commands"
Top lessons which are viewed more times.
Arithmetic Operators of MS-DOS Commands
Arithmetic Operators of MS-DOS Commands
String manipulation of MS-DOS Commands
Relational Operators of MS-DOS Commands
String manipulation of MS-DOS Commands
String manipulation of MS-DOS Commands
Things to Know of MS-DOS Commands
  Copyright © 2014 Knowledge walls, All rights reserved
KnowledgeWalls
keep your tutorials and learnings with KnowledgeWalls. Don't lose your learnings hereafter. Save and revise it whenever required.
Click here for more details