SynchronizationMode - PowerShell
So I have the sync from my local to remote folders working, and it transfers any missing files into the remote folders.
I am however unable to get the sync to remove files out of the remote folders which are not present on the local folders. I have found examples for -delete but this isn't workable in the winscp powershell module I am using...
any help or point into the right location would be greatly appreciated. Below is part of what I am using...
#sync files from usb to remote path
$synchronizationResult = $session.SynchronizeDirectories(
[WinSCP.SynchronizationMode]::Remote, $localPath, $remotePath, $False)
# Throw on any error
$synchronizationResult.Check()
I am however unable to get the sync to remove files out of the remote folders which are not present on the local folders. I have found examples for -delete but this isn't workable in the winscp powershell module I am using...
any help or point into the right location would be greatly appreciated. Below is part of what I am using...
#sync files from usb to remote path
$synchronizationResult = $session.SynchronizeDirectories(
[WinSCP.SynchronizationMode]::Remote, $localPath, $remotePath, $False)
# Throw on any error
$synchronizationResult.Check()