title: Get file name from path
body: <p>How do I get the folder name from my path?</p>
  
  <p>This is the file path:</p>
  
  <pre><code>@"C:\Users\ME\Desktop\videos"
  </code></pre>
  
  <p>Under the main path there's a folder that I want to get the name:</p>
  
  <pre><code>@"C:\Users\ME\Desktop\videos\sample2"
  @"C:\Users\ME\Desktop\videos\sample3"
  @"C:\Users\ME\Desktop\videos\sample4"
  </code></pre>
  
  <p>Under the sample folder, there are videos that I want to get the name:</p>
  
  <pre><code>@"C:\Users\ME\Desktop\videos\sample1\video1.mp4
  </code></pre>
  
  <p>This is my code:</p>
  
  <pre><code>foreach(string s in Directory.GetFiles(@"C:\Users\ME\Desktop\videos").Select(Path.GetFileName))
  {
      MessageBox.Show(s);
  }
  </code></pre>
  
  <p>Is this possible? How do I get the name of every file that exists inside my video/main folder using only the main path?</p>