Error code 2 on SCP file from local to remote computer
Good afternoon all
I have an issue with PowerShell and WinSCP.
Basically I have code which checks for replication on HyperV, then SCP the result to an SCP server.
So far the script works well, except when SCPing the file.
My code:
When the code is run, I get the following message :
Thanking you for your assistance in this regard.
I have an issue with PowerShell and WinSCP.
Basically I have code which checks for replication on HyperV, then SCP the result to an SCP server.
So far the script works well, except when SCPing the file.
My code:
$transferResult = $session.PutFiles("C:\Reports\*.htm", "/incoming/", $False, $transferOptions)
I have checked and verified that the SSH account do have write access to the specified account, and I have SCP'd successfully from another computer using Posh-SSH with the same account.Error: Exception calling "Check" with "0" argument(s): "Cannot create remote file '/incoming/FileName2022-01-12.htm'.
No such file or directory.
Error code: 2
Error message from server: No such file"
Thanking you for your assistance in this regard.