vendredi 7 octobre 2016

Using GOTO inside an IF statement

   if  %_var%==1 (
    goto :group1
) else if  %_var%==2 (
    goto :group2
) else (
    goto :groupOthr
)

What am I doing wrong here ? I keep getting the error -

( was unexpected at this time.

Tried doing this -

   if  %_var%==1 (goto :group1
) else if  %_var%==2 (goto :group2
) else (goto :groupOthr
)

And then I get -

(goto was unexpected at this time.

Aucun commentaire:

Enregistrer un commentaire