I have the following script:
setlocal enabledelayedexpansion
set count=0
pause
for /f "tokens=*" %%i in ("%cd%srccheck.txt") do (
set error[!count!]=%%i
set /a count+=1
)
echo "%error[0]%"
pause
This gives me the path of the text.txt file but it should give me the first line of this doc. If I take away the “” in the path then it works.
The problem is then the code fails if i have spaces in the folder path which is really anoying to me.