FTP download fails after SIZE command

Advertisement

YME
Joined:
Posts:
1

FTP download fails after SIZE command

Hi,

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: https://winscp.net/forum/viewtopic.php?t=13975

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!
Yannick
  • winscp.log (8.73 KB, Private file)
Description: log from .Net assembly
  • ui_client.log (5.46 KB, Private file)

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
29,095
Location:
Prague, Czechia

Re: FTP download fails after SIZE command

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.

Reply with quote

Advertisement

You can post new topics in this forum