中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-09-23 12:53
47,812 topics / 349,917 posts / today 0 new / 48,273 members
DOS批处理 & 脚本技术(批处理室) » Ask about the problem of findstr with multiple characters.
Printable Version  3,393 / 2
Floor1 hcosoft Posted 2011-01-25 04:56
新手上路 Posts 2 Credits 2


I can only check one parameter, and this program has four parameters.
1 Password error
2 Connection timeout
3 Unknown error
4 Close connection

Ask: How should this code be written? It's impossible to run test.exe four times?
Hope to get advice from everyone

[ Last edited by hcosoft on 2011-1-25 at 06:12 ]
Floor2 liion631818 Posted 2011-01-25 10:34
新手上路 Posts 11 Credits 13 From 上海
Use fuzzy matching, and you change the tokens to the fields you want to intercept

Specific implementation, send the return text of test.exe for you to see
Floor3 goltaxhs Posted 2017-08-26 21:08
新手上路 Posts 8 Credits 8
If you want to match multiple characters at once, you can write it like this:
findstr /c:"Password error" /c:"Connection timed out" /c:"Unknown error" /c:"Close connection"
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023