title: Using PowerShell, read multiple known file names, append text of all files, create and write to one output file
body: <p>I have five .sql files and know the name of each file. For this example, call them one.sql, two.sql, three.sql, four.sql and five.sql. I want to append the text of all files and create one file called master.sql. How do I do this in PowerShell? Feel free to post multiple answers to this problem because I am sure there are several ways to do this.</p>
  
  <p>My attempt does not work and creates a file with several hundred thousand lines.</p>
  
  <pre><code>PS C:\sql&gt; get-content '.\one.sql' | get-content '.\two.sql' | get-content '.\three.sql' | get-content '.\four.sql' | get-content '.\five.sql' | out-file -encoding UNICODE master.sql
  </code></pre>