title: How to download a single file using Session.GetFiles in WinSCP C#
body: <p>So, basically I am trying to download only one file from the entire folder on my server.</p>
  
  <p>Folder "domain" contains those files right now:</p>
  
  <blockquote>
    <p>File1.txt<br>
    File2.txt<br>
    File3.txt</p>
  </blockquote>
  
  <p>So, as I can see in WinSCP docs if I want to download only one file I still should use <code>Session.GetFiles()</code> (<a href="https://winscp.net/eng/docs/library_session_getfiles" rel="nofollow noreferrer">method docs</a>) with full path to file. Okay, but I can't understand what's my problem, because it's not working.</p>
  
  <pre><code>session.GetFiles("/domains/domain/File1.txt", Directory.GetCurrentDirectory());
  </code></pre>
  
  <p>However if I change the remote path to whole directory, not a single file I need it works great, but I don't need all three .txt files.</p>
  
  <pre><code>session.GetFiles("/domains/domain/", Directory.GetCurrentDirectory());
  </code></pre>