\
Skip Navigation LinksHome > Coding > Scripting > MS-DOS > View Item Info\
 
 
[]Return to List
[]UDF / UDC Library
[]Script Library



 

Showing: IF Commands

A decision making command used to test the equality of two values. *

IF "ValueOne"=="ValueTwo" GOTO Label
[Arguments] |  [Constants] |  [Return Type] |  [Script Example]

Arguments
ValueOne
A string value to compare with ValueTwo

ValueTwo
A string value to compare against ValueOne

Label
A valid label within the script to redirect flow to if the condition is true.


Constants
MS-DOS does not use any constants


Return Type
None.


Script Example
Unless otherwise noted, this code is licensed according to the terms and conditions listed here.
@ECHO OFF
SET MYWINDIR=C:\Windows
IF "%MYWINDIR%"=="%WinDir%" GOTO MATCH
ECHO The Values Did not match:
ECHO %MYWINDIR%
ECHO %WinDir%
GOTO END

:MATCH
ECHO The Values matched

:END
PAUSE

* This text may contain reprinted material from the Microsoft .

Help Support Dx21
Buy Thru Us

 FAQs  |  Terms Of Use  |  Privacy Policy  |  Contact Us
Copyright © 1997 - 2010 Dx21, LLC. All rights reserved.
Dx21, LLC a Washington Limited Liability Company
Page Rendered at: 9/9/2010 12:34:59 PM for Unknown