Session.GetFiles Method failed to copy in the local server

Advertisement

squayum
Joined:
Posts:
6
Location:
UK

Session.GetFiles Method failed to copy in the local server

I was trying to sync the local server with the remote server using WinSCP library in .NET C# environment (Assembly WinSCPnet, Version=1.5.3.8172, Culture=neutral, PublicKeyToken=2271ec4a3c56d0bf), using the method called GetFiles() in Session class.
But what happens GetFiles() method detects the modified files, but it does not transfer the file from the remote server to the local server. I don’t understand the reason. Has any of you experienced this problem, if so how you resolved this.
method below was used:
transferResult = s.GetFiles(ps.f_remote, ps.t_local, false, transferOptions);
Note transferResult.IsSuccess was set and transfer count was nonzero, but no file was copied in the local server. Do you have any idea why it fails to copy in the local server?

Reply with quote E-mail

Advertisement

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

Re: Session.GetFiles Method failed to copy in the local server

What do you mean by "method detects the modified files"? The Session.GetFiles does not do any "modified files" detection, at least not with the default settings.

Anyway, please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate the session log file, set Session.SessionLogPath. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.

Reply with quote

squayum
Joined:
Posts:
6
Location:
UK

Martin,
Thanks for your reply. I modified some files in the remote server. Session.GetFiles() detects the changed files, but it did not sync/ or copy in the local server (on my local computer).
I did not understand the reason. I copied the log for you. The log shows it copied, but it did not copy to local server.
I also tried session.SynchronizeDirectories() method to synchronise my local server. Here the problem is setting time zone offset for day light saving. I can't see any option for setting this in the code. I set transfer options.FileMask = ">2022-04-04". This did not work either. Do you know the reason why it is not working?

Reply with quote E-mail

Advertisement

You can post new topics in this forum