title: How to use PowerShell copy-item and keep structure
body: <p>I have a directory structure that looks like this:</p>
  
  <pre><code>C:\folderA\folderB\folderC\client1\f1\files
  C:\folderA\folderB\folderC\client1\f2\files
  C:\folderA\folderB\folderC\client2\f1\files
  C:\folderA\folderB\folderC\client2\f2\files
  C:\folderA\folderB\folderC\client3\f1\files
  C:\folderA\folderB\folderC\client4\f2\files
  </code></pre>
  
  <p>I want to copy the content of the <code>f1</code> folders in C:\tmp\ to get this</p>
  
  <pre><code>C:\tmp\client1\f1\files
  C:\tmp\client2\f1\files
  C:\tmp\client3\f1\files
  </code></pre>
  
  <p>I tried this:</p>
  
  <pre><code>Copy-Item -recur -path: "*/f1/" -destination: C:\tmp\
  </code></pre>
  
  <p>But it copies the contents without copying the structure correctly.</p>