I am trying to do a simple sftp upload with poswershell. It looks like my command to transfer the file is not picking up at all. My command looks like this:
& "C:\Program Files (x86)\WinSCP\WinSCP.com" `
/log="C:\writable\path\to\log\WinSCP.log" /ini=nul `
"open sftp:// (removed by poster)
"Put C:\Test\*.*" `
$winscpResult = $LastExitCode
if ($winscpResult -eq 0)
And my output in PowerShell looks like this:
PS C:\> C:\Users\xxxx\Downloads\test_shell.ps1
Error occurred during logging. It's been turned off.
Can't open log file 'C:\writable\path\to\log\WinSCP.log'.
System Error. Code: 2.
The system cannot find the file specified
Searching for host...
Connecting to host...
Using username xxxx
Authenticating with pre-entered password.
Starting the session...
Active session:  xxxx
Any thoughts on what I did wrong?