title: cmd - Search folder for a string inside all files - return file name when found
body: <p>Could anyone give me an example or solution for finding a string within a folder full of files. </p>
  
  <p>When the string is found in one of the files - then the bat file should return the name of the file that contains it.</p>
  
  <p>e.g.</p>
  
  <p>Inside: "C:\MyDocuments\Files\" is:</p>
  
  <p>samplefile1.xml</p>
  
  <p>samplefile2.xml</p>
  
  <p>samplefilen.xml...</p>
  
  <p>samplefile1000.xml</p>
  
  <p>Search for string: '000234'</p>
  
  <p>if found, return the name of the file in which it was found.</p>
  
  <p>Here's an idea of what I'm doing (wrong :) at the moment:</p>
  
  <pre><code>findstr /S /M "000234" "C:\MyDocuments\Files\"
  
  pause
  </code></pre>