title: Trying to create directories with Powershell
body: <p>I'm trying to create directories at some target location, if they don't exist.</p>
  
  <p>The name of the directory is from another source-location.</p>
  
  <p>for each directory name in <code>C:\some\location</code><br>
  create a new directory of the same name in <code>C:\another\location.</code></p>
  
  <p>for example.</p>
  
  <pre><code>c:\some\location\
                  \apples
                  \oranges
  
  to
  c:\another\location\
                     \apples
                     \oranges
  </code></pre>
  
  <p>so in effect i'm recreating all the folders from <code>source -&gt; to -&gt; target</code>.
  NOT recursive, btw. just top level.</p>
  
  <p>So i've got this so far with PS:</p>
  
  <p><code>dir -Directory | New-Item -ItemType Directory -Path (Join-Path "C:\jussy-test\" Select-Object Name)</code></p>
  
  <p>or </p>
  
  <p><code>dir -Directory | New-Item -ItemType Directory -Path "C:\new-target-location\" + Select-Object Name</code></p>
  
  <p>and i'm stuck. I'm trying to get that last bit right. but anways, maybe someone has a nicer idea in their head?</p>