IF /I "%class%" EQU "Social Studies"...
The parsing logic for an if
statement is very specific; if [/i][NOT] arg1 op arg2
where /i
and not
are optional, but must if used, be used in that order.
Your code sees /i
where it expects a comparison-operator and generates a syntax-error.
When you use the point-click-and-giggle method of executing a batch, the batch window will often close if a syntax-error is found. You should instead open a 'command prompt' and run your batch from there so that the window remains open and any error message will be displayed.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…