本帖最后由 weichenxiehou 于 2012-7-2 08:55 编辑
- @echo off
- :aa
- set /p name=输入姓名(多个姓名用空格分隔):
- set /p t=查询次数:
- set n=
- findstr "%name%" 412.txt > temp.txt
- for %%i in (%name%) do cd.>%%i.txt
- :bb
- set /p ri=只搜索日期(两位数):
- for %%i in (%name%) do (
- findstr "[0-9][0-9][0-9][0-9]-[0-9][0-9]-%ri%" temp.txt >> %%i.txt && echo 查到%%i%ri%号的消费记录 || echo 没有找到%%i%ri%号的消费记录>>%%i.txt
- )
- echo 查询别的日期
- set/a n+=1
- if %n% equ %t% del temp.txt&goto :eof
- goto bb
复制代码
|