Topic "FTP download fails after SIZE command"

Author Message
[View user's profile]

Joined: 2016-08-23
Posts: 1

I'm using the .NET assembly version 5.9.1 to download a file from a FTP server, but after the SIZE command it fails. When I'm using the client UI it works perfect, with the client UI the SIZE command fails but it continues downloading the file with the RETR command.

Attached you can find the logs for the .NET assembly and the client ui.

I've found a similar topic here:

The workaround (explained in this other topic) by appending the * (wildcard) at the remote path file name works, but is it possible to add a configuration or something else to allow this kind of downloads (without appending the wildcard)?

Thanks in advance!
winscp.log (8.73 KB) Private file

Description: log from .Net assembly

ui_client.log (5.46 KB) Private file

Description: (none)

[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 27059
Location: Prague, Czechia
The API specifications says it clearly:

string remotePath: Full path to remote directory followed by slash and wildcard to select files or subdirectories to download.

You can use Session.CombinePaths(path, "*") to append the wildcard.

You can post new topics in this forum


What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License