- @echo off
- set input=&set /p input=请输入姓名:
- set /a m=0
- for /f "tokens=2 delims=:" %%a in (a.txt) do (
- set /a m+=1,n=m-1
- call set _%%m%%=%%a
- if "%%a"=="%input%" (
- call call echo."%input%"的ID是:%%%%_%%n%%%%%%
- echo.&pause&goto :eof
- ))
- echo.对不起,找不到"%input%"&echo.&pause
复制代码
|