I've been reading the forum and help files but am finding myself stuck. I am transferring two txt files via SFTP and when using the GUI, I am able to do so without issue. However, the script I am using is giving me an Error code: 4 for one file (file1 below), and 'Receiving ssh2_msg_channel_data for nonexistent channel 0' error for the other (file 2 below). I've used the command generator in the GUI, am using a bat file and separate winscp script file, have saved the ini file with config settings and tried calling that or not, have tried a couple different switches on the PUT command, and have enabled and read log files.
Here are sample files.
"C:\Program Files (x86)\WinSCP\WinSCP.com" /log="D:\Program Files\mypath\test.log" /ini="D:\Program Files\mypath\winscp.ini" /script="D:\Program Files\mypath\winscp-script2.txt"
open sftp://username:email@example.com/ -hostkey="ssh-rsa 1024 123456etc" -rawsettings FSProtocol=2
put "D:\Program Files\mypath\file1.txt" "/incoming/stg/" -nopreservetime -resume
put "D:\Program Files\mypath\file2.txt" "/incoming/stg/"