title: How to get parent folder of a directory
body: <p>I'm currently writing a script (for the first time) in powershell that gets called by tfs while building. What I have are the environment variable provided to me such as:</p>
  
  <pre><code>$Env:TF_BUILD_BINARIESDIRECTORY
  </code></pre>
  
  <p>What I need is to get the parent to this directory. How do I do this?</p>
  
  <p><strong>Update</strong>: Really, I'm just trying to do a Copy-Item to the parent of the parent of $Env:TF_BUILD_BINARIESDIRECTORY</p>