为什么“ECHO is off”出现在这里并破坏了一切?
源代码:
set authfile=\\COMPUTER\Users\username\auth.txt
echo Authentication file not detected.
echo.
echo Press enter to generate a new one...
pause > nul
echo 4.7>"%authfile%"
echo 0>>"%authfile%"
echo sigh>>"%authfile%"
echo 0>>"%authfile%"
echo 0>>"%authfile%"
echo 0>>"%authfile%"
echo 0>>"%authfile%"
echo 0>>"%authfile%"
if exist "%authfile%" goto success
goto failure
输出:
Authentication file not detected.
Press enter to generate a new one...
ECHO is off.
ECHO is off.
ECHO is off.
ECHO is off.
ECHO is off.
ECHO is off.
授权文件:
4.7
sigh
是的,所有的 0 必须以正确的顺序和位置输出。