1.

Solve : Arrays in batch files?

Answer» HI,

i write a code to read the input values while running the SCRIPT. I want to store those values in array and use them later in the script. How can i GET this?


thanks,
Use the set command in a loop.


Quote
@echo off
setlocal enabledelayedexpansion
set c=0
for /F "delims=" %%a in ('type "file.txt"') do (
set /a c=c+1
set cnt=0000!c!
set cnt=!cnt:~-4!
set array!cnt!=%%a
)
set array


If you DESCRIBE exactly what you want to do it would help us to provide some code.


Discussion

No Comment Found