PutFiles removes source file even though transfer fails
I'm using winscp\5.15.9.0\lib\WinSCPnet.dll in some PowerShell scripts.
Usually it works perfect, but recently I have experienced that the source file is missing/removed after a failed transfer.
Here the pretty straight forward code:
Here's the error I get is:
After this the source file is gone?
Any clues?
NB: For now I have changed the bool
Br,
Ronnie
Usually it works perfect, but recently I have experienced that the source file is missing/removed after a failed transfer.
Here the pretty straight forward code:
$transferResult = $session.PutFiles($file, $destination, $true, $transferOptions); foreach ($transfer in $transferResult.Transfers) { if ($transfer.Error -eq $null) { write "$now INFO upload of $($transfer.FileName) succeeded"; } } $void=$transferResult.Check();
Error transferring file 'C:\<filename>.xml'. Copying files to remote side failed. Server busy. Please try again later. Connection failed. Disconnected from server Connection failed. Server busy. Please try again later.
Any clues?
NB: For now I have changed the bool
remove
flag to $false
, and I move the file in a separate command. But still it should work with the remove
flag set.
Br,
Ronnie