Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

I have asked for WinSCP session log file.
squayum

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?
martin

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.
squayum

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?