title: c# Directory.GetFiles file structure from app root
body: <p>I have the following piece of code:</p>
  
  <pre><code>string root = Path.GetDirectoryName(Application.ExecutablePath);
  List&lt;string&gt; FullFileList = Directory.GetFiles(root, "*.*",
       SearchOption.AllDirectories).Where(name =&gt;
            { 
                return !(name.EndsWith("dmp") || name.EndsWith("jpg"));
            }).ToList();
  </code></pre>
  
  <p>Now this works very well, however the file names with it are quire long.
  is there a way i can take out the path till root? but still show all the subfolders?</p>
  
  <p>Root = C:\Users\\Desktop\Test\</p>
  
  <p>But the code would return the whole path from C:
  while I'd prefer if I could take out the root bit straight away. but still keep the file structure after it.</p>
  
  <p>eg 
  C:\Users\\Desktop\Test\hi\hello\files.txt
  would return
  \hi\hello\files.txt</p>
  
  <p>I know i can just iterate over the file list generated and remove it all one by one, I'm wondering if I can just filter it out stright.</p>