session.ListDirectory(session.HomePath + "/")
I did try and after some digging I see why WinSCP client works one way any my program works differently.
In the WinSCP tool I specify the directory to be /HOME_SFTP_DIR/LOC_OF_FILE
When I use C# I login and I am taken to /HOME_SFTP_DIR and of course the listing is only the directory.
However, I cannot figure out the command to change directory to /LOC_OF_FILE so then I can do a listing to see if there is anything for me to download.
So, I solved my first problem which was me, but I cannot figure out how to change directories.
So did you try, what I have proposed?
The customer is using VShell from Vandyke using SFTP-3/SSH-2
File transfer protocol = SFTP-3
Cryptographic protocol = SSH-2
SSH implementation = SftpSSHD_1.4.31_Comments
Encryption algorithm = aes
Compression = No
That's probably some peculiarity of your FTP server.
If I use WinSCP GUI client, I am connected to the default directory of the SFTP server and I can see the single file it contains.
However, if I use C# and connect to the same exact server then use ListDirectory(".") I only receive the ".." and the current directory name. No matter what I try it seems I am not able to view the file.
What is the trick I am missing?