title: Move files when they contain a specific word?
body: <p>I am currently trying to write a powershell script that looks through all files in a given directory and moves them to a different directory if a specific word has been found.</p>
  
  <p>This is what i currently have:</p>
  
  <pre><code>$source = "Z:\Documents\16_Med._App\Aufträge\RuheEKG_24HBP_Skript\Ursprung_test"
  $hans = Get-ChildItem Z:\Documents\16_Med._App\Aufträge\RuheEKG_24HBP_Skript\Ursprung_test -filter *.txt -recurse 
  foreach($hans in $source) {
      select-string -list -pattern "24BHD" -path $source
  }
  </code></pre>
  
  <p>Now what do i need to add to make the script move the files containing the string <code>24BHD</code>?</p>
  
  <p>All help would be appreciated!</p>