Thottam R. Sriram Code sample · MSDN blog archive

Batch file string comparison

blog-cmd-batch-string-compare

Small cmd batch snippet showing case-insensitive string comparison with if /I NOT and a label-based jump.

Source

a.cmd Batch
SET PeerCloudGPMEnabled=%1

echo %PeerCloudGPMEnabled%

if /I NOT "%PeerCloudGPMEnabled%" == "true" goto :PeerCloudGPMEnabledEND
echo inside if
:PeerCloudGPMEnabledEND

← All posts