WinSCP .NET Assembly cannot download Dot files from Serv-U

Advertisement

rainmanec
Joined:
Posts:
11
Location:
China

WinSCP .NET Assembly cannot download Dot files from Serv-U

When I use "WinSCP .NET Assembly" to GetFiles("/.ignore", "xxx") from Serv-U server.

I found before RETR /.ignore the MLST /.ignore will excute, then Serv-U server return "550 No files found", the winscp throw a "SessionRemoteException: Can't get attributes of file '/.ignore'" error, download fail.

How to user WinSCP .NET Assembly to download dot files from serv-u?

Thanks very much!

Reply with quote

Advertisement

rainmanec
Joined:
Posts:
11
Location:
China

Re: WinSCP .NET Assembly cannot download Dot files from Serv-U

martin wrote:

Can you download that file using any FTP client at all?

Yes, I can download the '.ignore' file with FileZilla or WinSCP Client.
But could not download in C# with WinSCP .Net assembly.
session.GetFiles("/.ignore", @"D:\backup\.ignore");

Reply with quote

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

Re: WinSCP .NET Assembly cannot download Dot files from Serv-U

Post a log file from WinSCP GUI showing download of those files.

It's possible that the server returns dot-files in MLSD or LIST response, but fails MLST command for them. That's imo a (server's) bug.

Why do you even call GetFiles explicitly for that single file?

One possible workaround is doing something like GetFiles("/.ignor[e]", "xxx") - As the parameter is file mask (although it can match a single file only), WinSCP should use MLSD or LIST (to retrieve list of files) instead of MLST (to retrieve attributes of the specific file).

Reply with quote

rainmanec
Joined:
Posts:
11
Location:
China

Re: WinSCP .NET Assembly cannot download Dot files from Serv-U

martin wrote:


One possible workaround is doing something like GetFiles("/.ignor[e]", "xxx") - As the parameter is file mask (although it can match a single file only), WinSCP should use MLSD or LIST (to retrieve list of files) instead of MLST (to retrieve attributes of the specific file).

Thanks very much!

Use your method GetFiles("/[.]ignore", "xxx"), I solve this problem.

Reply with quote

Advertisement

You can post new topics in this forum