When I run this batch file from a command-prompt, I get this error:
The syntax of the command is incorrect.
It's to do with my IF statement, but as far as I can tell my syntax is correct - including ensuring I have the necessary whitespace around the parenthesis:
SET foo=bar
:: test
IF "%foo%" EQU "bar" (
:: foo
ECHO "equal to"
) ELSE (
:: bar
ECHO "not equal to"
)