It won't work :(
setlocal enabledelayedexpansion
SET ENR[1]=12345
SET ENR[2]=12345
SET ENR[3]=99999
SET ENR[4]=45678
SET /a Count=4
REM marking doubles from array
SET /a Help1=%Count%-1
FOR /L %%i in (1,1,%Help1%) do (
SET /a Help2=%Count%-%%i
FOR /L %%a in (1,1,!Help2!) do (
IF !ENR[%%i]!==!ENR[%%i+%%a]! SET ENR[%%i]="double"
)
How can I make !ENR[%%i+%%a]!
work? Of coure I want the computer to calculate %%i+%%a
before expanding the variable.