Logo 
Search:

Dos Articles

Submit Article
Home » Articles » Dos » BatchRSS Feeds

BATCH FILE SHOWING THE STRING COMPARISON

Posted By: Milind Mishra     Category: Dos     Views: 19010

BATCH FILE SHOWING THE STRING COMPARISON.

Code for BATCH FILE SHOWING THE STRING COMPARISON in Dos

@echo off

CLS


REM           STRING COMPARISONS.


REM           BATCH FILE STARTS..............

ECHO          THIS IS BATCH FILE SHOWING THE NUMERIC COMPARISON.

SET var=0

SET mul=0

SET /A "%var=1+2"
ECHO THE FIRST STRING IS %var%

SET /A "%mul=1+2"
ECHO THE FIRST STRING IS %mul%

IF "%var%" == "%mul%" GOTO SAME
     GOTO NOTSAME
     GOTO EXIT


:SAME
        ECHO STRINGS ARE SAME.
        GOTO EXIT

:NOTSAME
       ECHO STRINGS ARE NOT SAME.
       GOTO EXIT

:EXIT

  
Share: 


Didn't find what you were looking for? Find more on BATCH FILE SHOWING THE STRING COMPARISON Or get search suggestion and latest updates.

Milind Mishra
Milind Mishra author of BATCH FILE SHOWING THE STRING COMPARISON is from India.
 
View All Articles

 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!