title: How do I copy a folder, with subfolders & items, from the scripts location?
body: <p>I'm trying to create a script that copies a folder, with subfolders, from the source-directory of the script to <code>C:\Tools</code>.</p>
  
  <p>The folder is created fine, but no files are copied over and I get no error messages.</p>
  
  <p>What am I doing wrong?</p>
  
  <p>Code snippet below (PowerShell v2.0):</p>
  
  <pre><code>$from = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent
  $to =  C:\Tools\
  New-Item -ItemType Directory -Path C:\Tools
  New-Item -Force $to
  Copy-Item "$from\Tools" $to -Recurse
  </code></pre>