回复 6# asd674744769 - @echo off
- setlocal enabledelayedexpansion
- set "n=0"
- for /f "skip=3 tokens=3*" %%i in ('netsh interface show interface') do (
- set /a n+=1
- set "name_!n!=%%j"
- )
- :Select_Card
- for /l %%i in (1,1,%n%) do echo %%i:!name_%%i!
- set /p "Select_Card=选择网卡(请勿选择本地连接):"
- if "!name_%Select_Card%!"=="" (
- echo.
- echo 选择错误!
- pause>nul & cls & goto :Select_Card
- )
- echo 选择了!name_%Select_Card%!
- pause&exit
复制代码
|