Page tree

Welcome to FreeSoftwareServers Confluence Wiki

Skip to end of metadata
Go to start of metadata

https://stackoverflow.com/questions/11845409/if-then-else-statements-in-windows-batch

https://stackoverflow.com/questions/49795973/check-if-list-variable-is-empty-in-windows-batch

https://www.robvanderwoude.com/battech_defined.php

https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-xp/bb490920(v=technet.10)?redirectedfrom=MSDN


Operator | Description
EQU      | equal to
NEQ      | not equal to
LSS      | less than
LEQ      | less than or equal to
GTR      | greater than
GEQ      | greater than or equal to
if errorlevel 1 (
  echo Failed
  exit /b
) else (
  echo Success
)
IF <TEST> THEN (
ECHO DO STUFF
)
IF DEFINED MyVar (ECHO MyVar IS defined) ELSE (ECHO MyVar is NOT defined)
if "%var%"=="" (
if not "%var%"=="" (
  • No labels