なぜ「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.
auth.txt:
4.7
sigh
はい、これらのすべての 0 は、正しい順序と場所で出力する必要があります。