title: Search and then delete depending on whether files contain a string
body: <p>I'd like to search through multiple text files in a single directory for a string ('monkey'), if the string exists, then either, depending on what's easiest:</p>
  
  <ol>
  <li>rename the matching string - e.g. change monkey monkey1 and save then file and carry on searching/processing</li>
  </ol>
  
  <p>or </p>
  
  <ol start="2">
  <li>Delete any file that has the matching string.</li>
  </ol>
  
  <p>Have searched but can't seem to find anything straightforward.</p>