title: How to loop through files in a folder pass a value and insert text into a file
body: <p>Hello I have this code I've been working on to loop through a folder add file name to command line parameter of an executeable then output the results to a text file..
  The code works for one interation but does not seem to loop through all the files and append to the text file.
  Can you take a look at my structure and see why it is not looping through all the files and appending.
  Regards.</p>
  
  <pre><code>$Path = "C:\rawfiles"
  $files = Get-ChildItem C:\rawfiles\*.001
  ForEach ($file in $files) { 
      c:\outputfiles\ldump.exe $file.fullName &gt; c:\outputfiles\test9.txt -Append
      "=======End of Batch========" | Out-File c:\outputfiles\test9.txt -Append
  }
  </code></pre>