Check if input argument exists

@ECHO OFF

@REM Let's assume that you want to check whether or not year input argument exists
SET year=%1
 
IF [%year%]==[] GOTO MISSING_ARGS
 
echo Do something.
echo Do another thing.
 
GOTO THE_END
:MISSING_ARGS
echo ERROR: Year argument is missing! Supply year argument to the batch file.
 
:THE_END
@REM The end. Do nothing. There should be no other statement.