title: Generate SQL script to insert XML from files using Powershell
body: <p>I have a bunch of (50+) XML files in a directory that I would like to insert into a SQL server 2008 table.</p>
  
  <p>How can I create a SQL script from the command prompt or Powershell that will let me insert the files into a simple table with the following schema:</p>
  
  <pre><code>XMLDataFiles
  (
    xmlFileName varchar(255),
    content xml
  )
  </code></pre>
  
  <p>All I need is for something to generate a script with a bunch of insert statements. Right now, I'm contemplating writing a silly little .NET console app to write the SQL script.</p>
  
  <p>Thanks.</p>