I tried to modify my batch code to catch more cases. I have a line that checks input, and I wanted to have a specific initialization for a specific input
This is the input call:
:: get user input
set /p ph="Enter phase (e.g: 7, 8, 81, 82, 9, vs2, vs3): "
This is the initialization:
::(loc2, loc3, synergy are all variables I use in different places)
if %ph%==vs2(
set loc2=C:\mp_4m_ph2
set loc3=C:\mp_4m_ph2\mp_4m
set synergy=C:\synergy\mp4m_ph2
)
Result:
The syntax of the command is incorrect.
I don't understand what's going wrong here, since I used if before: if %wantbackup%==n (goto start_delete) and that worked fine
If I remove this if entirely there are no errors. I also verified this is the location of the problem by echo 1 just before the if and inside it. Only the before part printed.
Aucun commentaire:
Enregistrer un commentaire