Write a bat script that follows this pseudo code and use {{{PLACEHOLDER_for_<item>}}} this format for placeholders:
1) Search for a <text file> using regular expressions like grep.
2) If file is found then proceed to next step. Else not found then wait 30 second and go back to step 1. (This loop should only execute for 20 times at NAME_1)
3) Search for a <string> inside that text file using regular expressions like grep.
4) If the string is found, go to next step. Else go to step 6.
5) Execute a <command>.
6) Exit Respond with at most 1000 words.
user