
| Quote: | |
|
| Quote: | |
|
CODE: [Copy to clipboard]@echo off
set file=d:\123.txt
findstr "我" %file% >nul && >大.txt echo A
findstr "你" %file% >nul && >大.txt echo B
findstr "他" %file% >nul && >小.txt echo C || findstr "它" %file% >nul && >小.txt echo C
exit /b 0
CODE: [Copy to clipboard]实在想不通你为什么会要这么操作,如果把你的真实意图说出来的话,效率应该会大为提高的。@echo off
:: 假设连续递增到200
for /l %%i in (123,1,200) do (
find "我" d:\%%i.txt>nul&&echo A>大.txt
find "你" d:\%%i.txt>nul&&echo B>中.txt
findstr "他 它" d:\%%i.txt>nul&&echo C>小.txt
)
| Quote: | |
|
| Quote: | |
|
| Quote: | |
|
| Quote: | |
|
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |