Page tree

Welcome to FreeSoftwareServers Confluence Wiki

Skip to end of metadata
Go to start of metadata

ToDo: Automate Finding Array Size, for now you must set manually

@echo off
setlocal enabledelayedexpansion

::Set arrsize -1
set  arrsize=3
set  arrayline[0]=1A
set  arrayline[1]=2A
set  arrayline[2]=3A
set  arrayline[3]=4A
set  arrayline[4]=5A

::read it using a FOR /L statement
for /l %%n in (0,1,%arrsize%) do (
echo !arrayline[%%n]!
)
pause

Result:

1A
2A
3A
4A
Press any key to continue . . .
  • No labels