title: How to create a PowerShell script to check if txt files have more than 1 row of text?
body: <p>So I have alot of .txt files. I need for it to move txt files to a certain folder if they have more than 1 line.  That is,</p>
  
  <pre><code>Text text text
  Blah blah blah
  </code></pre>
  
  <p>But leave it alone if it's just</p>
  
  <pre><code>Text text text
  </code></pre>
  
  <p>Any suggestions on how to do this? This is on Windows XP if that helps.  Thanks!</p>
  
  <p>EDIT: Thanks John for your efforts. Figured out a way to do it in PowerShell</p>
  
  <pre><code># Specify folder name that will contain the filtered .txt files
  $goodFolder = "Filtered"
  
  get-childitem *.txt | foreach ($_) {
  $a = get-Content $_.fullname | Measure-Object
  
  # If more than one line is found in text file, move it. Otherwise, leave it alone
  If ($a.Count -gt 1) {   # If there is more than one line found in txt file
      Move-Item $_.fullname $goodFolder       # Then move it to a folder with text files with more than 1 line
  }
  }
  </code></pre>