I'm defining lists in a batch script and then like to print a specific element in each one of them, but getting an 'ECHO is off' output (is if it's empty).
I tried cycling trough the lists with a FOR loop and that worked fine.
This is the code for i'm trying to run
@echo off
rem --------start of Define list--------
set clist= A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
set ilist= X Y Z A B C D E F G H I J K L M N O P Q R S T U V W
set testl= 1 2 3 4
rem --------end of Define list--------
echo %clist[1]%
echo %ilist[1]%
echo %testl[1]%
Expected output:
B
Y
2
Actual output:
ECHO is off
ECHO is off
ECHO is off