I want to read a text file and store each line in an array. When I used the code below, \"echo %i%\" is printing 0 every time and only array[
\"echo %i%\"
0
array[
@ECHO OFF SETLOCAL FOR /f "tokens=1*delims=:" %%i IN ('findstr /n /r "$" url.txt') DO SET max=%%i&SET array[%%i]=%%j FOR /l %%i IN (1,1,%max%) DO CALL ECHO(%%array[%%i]%% GOTO :EOF
provided no line begins ":"