title: How can I get only part of a file path name?
body: <p>This is the line:</p>
  
  <pre><code>string t = Path.GetDirectoryName(file1);
  </code></pre>
  
  <p>The result is: </p>
  
  <pre><code>C:\\Users\\bout0_000\\AppData\\Local\\Extracting_Frames\\Extracting_Frames\\dat file\\converted.avi\\histogramValues.dat
  </code></pre>
  
  <p>I want it to only contain: <code>converted.avi</code>.</p>
  
  <p>PS: <code>converted.avi</code> is not a file name it's a path name. I want to get the last part of the path the last subdirectory without the file name.</p>