Post a reply

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

Re: Want to avoid overwritten existing files

SP2100 wrote:

Hi,
I tried to use your example here so that existing files are not overwritten in local folder , but it's not working. Local file though being new is being replaced by older file from server. Is there any other setting I need to follow?

session.SynchronizeDirectories(SynchronizationMode.Local, localPath, remotePath,false,false, SynchronizationCriteria.None, null);

Please set Session.SessionLogPath and attach a log showing the problem. Ideally on a very small set (one?) of files.
SP2100

Want to avoid overwritten existing files

Hi,
I tried to use your example here so that existing files are not overwritten in local folder , but it's not working. Local file though being new is being replaced by older file from server. Is there any other setting I need to follow?

session.SynchronizeDirectories(SynchronizationMode.Local, localPath, remotePath,false,false, SynchronizationCriteria.None, null);


I am using following statement to get files.

session.GetFiles(remotePath, localPath,false, transferOptions).Check();



Thanks!
martin

Re: Prevent Overwriting using Session.GetFiles

So you want to transfer only files that do not exist in the opposite directory?
It's rather a synchronization then.
Use this:
Session.SynchonizeDirectories(SynchronizationMode.Local, localpath, remotepath, false, false, SynchronizationCriteria.None, null);

https://winscp.net/eng/docs/library_session_synchronizedirectories
petoefalvi

Prevent Overwriting using Session.GetFiles

Hello,
I want to download files using 'Session.GetFiles'. But this method seems to overwrite existing files in destination folder. Can this be disabled somehow? I havn't found any topic in the documentation or any option for that.
regards,
Michael