Synchronize in .Net assembly and -Preview parameter

Advertisement

BillCumming
Joined:
Posts:
3
Location:
Milwaukee

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

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
40,476
Location:
Prague, Czechia

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");

Reply with quote

BillCumming
Joined:
Posts:
3
Location:
Milwaukee

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!!

Reply with quote

martin
Site Admin
martin avatar

BillCumming wrote:

Does this option work for remote to local sync?
No. That's why I explicitly referred to the "local to remote" synchronization.

Reply with quote

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

Reply with quote

Advertisement

martin
Site Admin
martin avatar

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

Reply with quote

Advertisement

You can post new topics in this forum