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

That's as designed. The SynchronizationResult.Removals reflects removals of remote files only. We may improve this in a feature.
BillCumming

OK. Last question: the FileTransferProgress and FileTransferred event handlers and $synchronizationResult.Removals.Count all seem to ignore any files that are removed. Is there a setting that I'm missing?

Thanks
martin

BillCumming wrote:

Does this option work for remote to local sync?

No. That's why I explicitly referred to the "local to remote" synchronization.
BillCumming

I'm using remote to local SFTP synchronization (local is the backup of a remote server), so I set the following (local is a Win7 64-bit system):

$sessionOptions.AddRawSettings("OverwrittenToRecycleBin", "1");
$sessionOptions.AddRawSettings("RecycleBinPath", "G:\VMServerBackup\testsave");

I ran the synch and 1 modified file was downloaded, but no file appeared in the RecycleBinPath location.

Does this option work for remote to local sync?

If so, I am scripting the backup of multiple directories. Can I change this sessionOptions value between calls to Synchronize, or do I have to close and re-open the session?

Thanks!!
martin

Re: Synchronize in .Net assembly and -Preview parameter

BillCumming wrote:

Does the .Net Assembly version of Synchronize support the -preview parameter from the command line version?

No it does not.

I would like to know BEFORE I execute the Synchronize command whether anything has changed (and therefore whether to backup the previous known good version).

If you are using local to remote SFTP synchronization, WinSCP can preserve the original for you:
sessionOptions.AddRawSettings("OverwrittenToRecycleBin", "1");

sessionOptions.AddRawSettings("RecycleBinPath", "/tmp/backup");
BillCumming

Synchronize in .Net assembly and -Preview parameter

Does the .Net Assembly version of Synchronize support the -preview parameter from the command line version?

I would like to know BEFORE I execute the Synchronize command whether anything has changed (and therefore whether to backup the previous known good version).