title: How to get file names from the directory, not the entire path
body: <p>I am using the below method to get the file names. But it returns the entire path and I don't want to get the entire path. I want only file names, not the entire path.</p>
  <p>How can I get that only file names not the entire path</p>
  <p><code>path= c:\docs\doc\backup-23444444.zip</code></p>
  <pre><code>string[] filenames = Directory.GetFiles(targetdirectory,&quot;backup-*.zip&quot;);
  foreach (string filename in filenames)
  { }
  </code></pre>