title: append text to a file with powershell
body: <p>I have the following powershell command that recursively loops through all .sql files in a folder ($ScriptFolder) and appends it to another sql file ($TargetFile).</p>
  
  <pre><code>Get-ChildItem -path "$ScriptFolder" -recurse |?{ ! $_.PSIsContainer } |?{($_.name).contains(".sql")} | %{ Out-File -filepath $TargetFile -inputobject (get-content $_.fullname) -Append }
  </code></pre>
  
  <p>What I would like to do as each .sql is appended to the target file, add text to the target file at the point .sql is appended to it and add text after the .sql is appended to the target file.</p>
  
  <p>I am new to powershell, so could anyone outline how i might do this? Thanks</p>