So, basically I am trying to download only one file from the entire folder on my server.
Folder "domain" contains those files right now:
File1.txt
File2.txt
File3.txt
So, as I can see in WinSCP docs if I want to download only one file I still should use Session.GetFiles()
(method docs) with full path to file. Okay, but I can't understand what's my problem, because it's not working.
session.GetFiles("/domains/domain/File1.txt", Directory.GetCurrentDirectory());
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.
session.GetFiles("/domains/domain/", Directory.GetCurrentDirectory());