I’d like to ask for a batch file to implement the following function:
I already have a text file ID.txt, with no spaces on each line, and its contents are for example:
abc
system
2753
60th anniversary
Then I want to use the command set /p= to input text, any text is fine, and compare the input text with these strings in ID.txt. If the input text contains any of the above strings, then exit.
For example, if I input "system file" or "system", since it contains "system", then it matches the condition above, so it should exit.
But if I only input "sys" or “series”, then it does not match the condition above, and should not exit.
Please, experts, help!
[ Last edited by q115643492 on 2009-9-30 at 14:59 ]
I already have a text file ID.txt, with no spaces on each line, and its contents are for example:
abc
system
2753
60th anniversary
Then I want to use the command set /p= to input text, any text is fine, and compare the input text with these strings in ID.txt. If the input text contains any of the above strings, then exit.
For example, if I input "system file" or "system", since it contains "system", then it matches the condition above, so it should exit.
But if I only input "sys" or “series”, then it does not match the condition above, and should not exit.
Please, experts, help!
[ Last edited by q115643492 on 2009-9-30 at 14:59 ]
