I recently wrote the code below on a batch file:
@echo off
cls
chcp 65001 >nul
for /f "Delims=" %%j in (%cd%\poo.txt) do (
echo %%j
set /a lo=%%j+1
echo %lo%
pause
)
The file appropriately titled "poo.txt" contains a number, '0' in this case. When the code is ran, it displays this output:
0
ECHO is off.
Press any key to continue...
Everything seems to have worked, except for when the code is supposed to show 0 + 1. Instead, it outputs "ECHO is off." I don't really get this error. I've been trying to find some kind of typo or mistake in my code, but I don't see anything wrong to my knowledge.