I have the cmd file below to start and stop some services. I also have some other small files to do other tasks. I would like to have a smooth way to echo some help text in case an invalid argument is given by the user. The command below seem to work OK but maybe there is a more elegant way to do this?
Secondly, how can I echo the "help" message without the double quotes? I had to add these so that CMD should not try to interpret the pipe and brackets inside the message string.
Finally, this only works if there are no arguments, how do I handle the case where there is an invalid argument? There must be a better way than to check if %1 == "START" or "STOP", I think.
if defined 1 goto :%1
echo "useage: [START|STOP]"