title: Remove the last two directories in C#
body: <p>How to remove the last two directories ?</p>
  
  <pre><code>D:\11\PayrollSystem\PayrollSystem\bin\Debug\JCMPayrollSystem.accdb
  </code></pre>
  
  <p>Then the output should be: </p>
  
  <pre><code>D:\11\PayrollSystem\PayrollSystem\JCMPayrollSystem.accdb
  </code></pre>
  
  <p>need help</p>