Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • thanks for the quick reply! sorry for the description of the problem, I edited the request. is it better now? Commented Oct 28, 2019 at 15:54
  • Yes, the question is better. I believe my answer will help you. Commented Oct 28, 2019 at 15:57
  • As a side note, to the above, I'd just like to add that check_ok does not contain any metacharacters, so there's no need to use the /C option. I would suggest we determine the actual intent and adjust the options accordingly, for instance, FindStr "\<check_ok\>" "C:\tmp\test.txt">NUL||GoTo :EOF would be more specific, as may FindStr /L "check_ok" "C:\tmp\test.txt">NUL||GoTo :EOF. You could even use Find.exe instead, Find "check_ok"<"C:\tmp\test.txt">NUL||GoTo :EOF or Find " check_ok "<"C:\tmp\test.txt">NUL||GoTo :EOF Commented Oct 28, 2019 at 16:15