You were possibly overwriting your
$transferOptions
variable elsewhere in your code.
Before posting, please read how to report bug or request support effectively.
Bug reports without an attached log file are usually useless.
$transferOptions
variable elsewhere in your code.
$transferOptions
to the Compare function as well. After toying around with things, I was able to get things working by using a variable name other than $transferOptions
. I don't fully understand why this matter, but it works.
$transferOptionsForThreads = New-Object WinSCP.TransferOptions
$transferOptionsForThreads.ResumeSupport.State = [WinSCP.TransferResumeSupportState]::Off
$transferOptionsForThreads.AddRawSettings("ReplaceInvalidChars", "0")
$difference.Resolve($syncSession, $transferOptionsForThreads) | Out-Null
IgnorePermErrors
doesn't appear to be taking effect for me, but I'll open a new thread for that to ensure this thread stays clean.
$transferOptions
also to the Session.CompareDirectories
?
Test.%7C
AddRawSettings("ReplaceInvalidChars", "0")
$difference.Resolve($syncSession) | Out-Null
$transferOptions = New-Object WinSCP.TransferOptions
$transferOptions.ResumeSupport.State = [WinSCP.TransferResumeSupportState]::Off
$transferOptions.AddRawSettings("ReplaceInvalidChars", "0")
$difference.Resolve($syncSession,$transferOptions) | Out-Null
Error: Exception calling "Resolve" with "1" argument(s): "Cannot create remote file '/server/Problem Files/Test.|'.