I\'m trying to use the following validation logic in a batch file but the \"usage\" block never executes even when no parameter is supplied to the batch file.
IF "%~1"=="" GOTO :Usage
~ will de-quote %1 if %1 itself is quoted.
" " will protect from special characters passed. for example calling the script with &ping