Reputation: 526
I'm preparing some batch file which contain following code:
set /p NodeType="echo which node type?"
if "%NodeType%" == "HSS"
(set o2ml=%CURRENT_PATH%\basicData)
While executing this, I'm getting following error:
The syntax of the command is incorrect.
What am I missing?
Upvotes: 0
Views: 118
Reputation: 75618
You may also not use ()
:
if "%NodeType%" == "HSS" ^
set o2ml=%CURRENT_PATH%\basicData
Upvotes: 0
Reputation: 387
Try this
set /p NodeType="echo which node type?"
if "%NodeType%" == "HSS" (set o2ml=%CURRENT_PATH%\basicData)
Upvotes: 2
Reputation: 80213
The opening parenthesis must be on the same physical line as its if
Upvotes: 1