Differences

This shows you the differences between the selected revisions of the page.

library_example_two_way_synchronize_delete 2020-12-21 library_example_two_way_synchronize_delete 2022-06-16 (current)
Line 1: Line 1:
-====== Two-Way Synchronization with Delete with SFTP/FTP server======+====== Two-way synchronization with delete with SFTP/FTP server·======
WinSCP [[task_synchronize_full|synchronization functionality]] is state-less. So when there is a file on one side, which is absent on the opposite side, WinSCP is not able to determine, if the file was added on the first side, or removed on the latter. For this reason in the [[task_synchronize_full#direction|//Both// direction]], WinSCP does not support the //Delete files// option. WinSCP [[task_synchronize_full|synchronization functionality]] is state-less. So when there is a file on one side, which is absent on the opposite side, WinSCP is not able to determine, if the file was added on the first side, or removed on the latter. For this reason in the [[task_synchronize_full#direction|//Both// direction]], WinSCP does not support the //Delete files// option.
Line 9: Line 9:
<code batch> <code batch>
-powershell.exe -File C:\path\SynchronizeTwoWayDelete.ps1 -sessionUrl "sftp://user:password@example.com/" -localPath "C:\local" -remotePath "/remote" -listPath "C:\cache\example.txt"+powershell.exe -File C:\path\SynchronizeTwoWayDelete.ps1 -sessionUrl "sftp://user:password;fingerprint=ssh-rsa-xxxxxxxxxxx...@example.com/" -localPath "C:\local" -remotePath "/remote" -listPath "C:\cache\example.txt"
</code> </code>
Line 34: Line 34:
param ( param (
    # Use Generate Session URL function to obtain a value for -sessionUrl parameter.     # Use Generate Session URL function to obtain a value for -sessionUrl parameter.
-    $sessionUrl = "sftp://user:mypassword;fingerprint=ssh-rsa-xx-xx-xx@example.com/",+    $sessionUrl = "sftp://user:mypassword;fingerprint=ssh-rsa-xxxxxxxxxxx...@example.com/",
    [Parameter(Mandatory = $True)]     [Parameter(Mandatory = $True)]
    $localPath,     $localPath,

Last modified: by martin