I just want to list all my Interface Network and choose one. BUT, I have more than 10 Interface (12 actually) and then got an error. Cannot make then a choice How can I use ABCDEFGHIJKLMNOPQ... in place of 12345678... Here is my code :
'''
@echo off
cls
setLocal enableDelayedExpansion
set c=0
set "choices="
echo Your Interfaces -
for /f "skip=2 tokens=3*" %%A in ('netsh interface show interface') do (
set /a c+=1
set int!c!=%%B
set choices=!choices!!c!
echo [!c!] %%B
)
choice /c !choices! /m "Select The Number of Your Interface Please: " /n
set interface=!int%errorlevel%!
set Connex="%interface%"
'''