title: Powershell Script to search for credit card numbers in a folder
body: <p>I am using the below script to search for credit card numbers inside a folder that contains many subfolders: </p>
  
  <pre><code>Get-ChildItem  -rec | ?{ findstr.exe /mprc:. $_.FullName } 
      | select-string "[456][0-9]{15}","[456][0-9]{3}[-| ][0-9]{4} [-| ][0-9]{4}[-| ][0-9]{4}"
  </code></pre>
  
  <p>However, this will return all instances found in every folder/subfolder. </p>
  
  <p>How can I amend the script to skip the current folder on the first instance found? meaning that if it finds a credit card number it will stop processing the current folder and move to the next folder. </p>
  
  <p>Appreciate you answers and help. </p>
  
  <p>Thanks in advance, </p>