This is my script:
@echo off
setlocal EnableDelayedExpansion
set "memuc=d:\file.exe"
set array[0]=foo
set array[1]=bar
set x=0
:SymLoop
if defined array[!x!] (
call "!memuc!" start -n !!array[%x%]!!
set /A x=!x! + 1
GOTO :SymLoop
)
endlocal
- Why
array[!x!]line cannot be replaced with with!array[%x%]!? I thought I have to use!when accesingdelayedExpansionvariables. - Why I have to use
%x%instead!x!?. The same, I thought!should be necessary accesingxvariable - Why I have to use two
!here!!array[%x%]!!?