title: Visual Studio Post Build Event - Copy to Relative Directory Location
body: <p>On a successful build, I wish to copy the contents of the output directory to a different location under the same <strong>"base"</strong> folder. This parent folder is a relative part and can vary based on Source Control settings.</p>
  
  <p>I have listed a few of the Macro values available to me ... </p>
  
  <p>$(SolutionDir) = <strong>D:\GlobalDir\Version\AppName</strong>\Solution1\build</p>
  
  <p>$(ProjectDir) =  <strong>D:\GlobalDir\Version\AppName</strong>\Solution1\Version\ProjectA\</p>
  
  <p>I want to copy the Output Dir contents to the following folder :</p>
  
  <p><strong>D:\GlobalDir\Version\AppName</strong>\Solution2\Project\Dependency</p>
  
  <p>The base location "D:\GlobalDir\Version\AppName" needs to be fetched from one of the above macros. However, none of the macro values list <strong>only</strong> the parent location.</p>
  
  <p>How do I extract <strong>only</strong> the base location for the post build copy command ?</p>