Topic "Synchronize in .Net assembly and -Preview parameter"

Author Message
BillCumming
[View user's profile]

Joined: 2015-04-27
Posts: 3
Location: Milwaukee
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).
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
BillCumming wrote:
Does the .Net Assembly version of Synchronize support the -preview parameter from the command line version?

No it does not.

Quote:
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:
Code:
sessionOptions.AddRawSettings("OverwrittenToRecycleBin", "1");
sessionOptions.AddRawSettings("RecycleBinPath", "/tmp/backup");
BillCumming
[View user's profile]

Joined: 2015-04-27
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!!
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
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
[View user's profile]

Joined: 2015-04-27
Posts: 3
Location: Milwaukee
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
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
That's as designed. The SynchronizationResult.Removals reflects removals of remote files only. We may improve this in a feature.
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License