title: Batch programming setting ERRORLEVEL from failed FIND command
body: <p>I have found the need to report an error level to a program that calls batch scripts.</p>
  
  <p>The script will create a CSV log file that I would like to check in order to display whether the script was run successfully.</p>
  
  <p>What I would like to say is something like </p>
  
  <pre><code>IF NOT FIND "[ERR" "test.csv"
  </code></pre>
  
  <p>or to say, that if the string <code>"[ERR"</code> is not in the output <code>ERRORLEVEL = 0 ELSE ERRORLEVEL = 1</code></p>
  
  <p>Hope this makes sense. I'm sure it is simple but setting error levels seems to be a royal pain in the a$se!</p>