试试- @echo off
- :st
- cls&set/p i=请输入日期(yyyy-mm-dd):
- for /f "delims=" %%a in (人员列表.txt) do (
- setlocal enabledelayedexpansion
- for /f "delims=" %%b in (412.txt) do (
- for /f "tokens=4,5 delims= " %%c in ("%%b") do (
- if "%%c"=="%%a" if "%%d"=="%i%" set flag=1
- )
- )
- if "!flag!"=="1" (echo %%a 有记录) else echo %%a 无记录
- endlocal
- )
- pause&goto :st
复制代码
|