IF "%~1" == "-help" (
ECHO "Hello"
)
where %1 refers to the first command line argument and ~ removes any quotes that were included when the script was called.
If Errorlevel 1 (
Echo Errorlevel is 1 or higher
REM The phrase "1 or higher" is used because If Errorlevel 1 statement means:
REM If %Errorlevel% GEQ 1
REM Not If %Errorlevel% EQU 1
)
...
If exist "C:\Foo\Bar.baz" (
Echo File exist
)
This checks if the file C:\Foo\Bar.baz's existence. If this exist, it echos File exist
The Not operator can also be added.