title: Copy a single file to a non-existing folder
body: <p>It's easy to copy multiple files to a folder that doesn't exists and let it be created:</p>
  
  <pre><code>Copy-Item C:\Temp\aa C:\Temp2\DoesNotExist
  </code></pre>
  
  <p>The command above will create the folder DoesNotExist. That's what I'm after.</p>
  
  <p>But what is the PowerShell syntax to the same when the source is only <em>a single file</em>?</p>
  
  <pre><code>Copy-Item C:\Temp\test.txt  C:\Temp2\DoesNotExist
  </code></pre>
  
  <p>I tried C:\Temp2\DoesNotExist\ (with the trailing slash), but Powershell says "The filename, directory name, or volume label syntax is incorrect." and refuses to copy the single file.</p>