Cannot read remote file

Advertisement

0701
Joined:
Posts:
4

Cannot read remote file

With C# I have problems with the functions GetFile or GetFileToDirectory. Error message: "no such file or directory". The function RemoteDirectoryInfo shows that the file is there. The log file is attached.

Thanks for your help.
  • WinScp.log (12.66 KB, Private file)

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,478
Location:
Prague, Czechia

Re: Cannot read remote file

It looks like a bug in the FTP server.
With SIZE command it responds with the file size, but with MDTM command with the very same path it claims that the file does not exist.
> 2023-12-12 12:52:30.043 SIZE /SanDisk-ExtremePro-00/BackupTestAndSmile/Clients/100010/Data/Sql/pcdrdatasql100010.zip
< 2023-12-12 12:52:30.048 213 1365434
> 2023-12-12 12:52:30.048 MDTM /SanDisk-ExtremePro-00/BackupTestAndSmile/Clients/100010/Data/Sql/pcdrdatasql100010.zip
< 2023-12-12 12:52:30.053 550 /SanDisk-ExtremePro-00/BackupTestAndSmile/Clients/100010/Data/Sql/pcdrdatasql100010.zip: No such file or directory
Is that ProFTPD? What version?

You should be able to workaround this by forcing WinSCP to use LIST command instead of MDTM using:
sessionOptions.AddRawSettings("ProtocolFeatures", "-SIZE,-MDTM");

Reply with quote

Advertisement

You can post new topics in this forum