Jayp wrote:
Thanks, still missing something and not sure why.
The sceduled task runs and fires up the script, connection is made (assumption), transfer does NOT happen and the local files are then moved to the completed folder. Nothing is logged so I cannot see what is not happening.
Run WinSCP.cmd
CD "C:\T1\NDD\"
winscp3.exe /console /script="NDD_SSH.txt" /log="log/&Y&M&D&T&S.log" /open <removed for privacy>
move "C:\T1\NDD\NDD XML output\*.xml" "C:\T1\NDD\NDD XML output\complete\"
exit
NDD_SSH.txt
option batch abort
open <removed for privacy> -hostkey="ssh-rsa 2048 86:17:7e:96:8d:22:22:dd:7c:98:f7:35:31:9c:37:98"
ls *.*
lcd "C:\T1\NDD\NDD XML Output"
put *.xml
ls *.*
close
exit
logging window screenshot attatched
1) winscp3.exe suggests you might be using an ancient version of WinSCP (thought the screenshot looks quite new). So first, make sure you get the latest one.
2) Use winscp.com, not winscp.exe.
See why:
https://winscp.net/eng/docs/executables
3) Better use full path with /log and backslashes, not slashes (it's local path!)
4) There's no /open command-line parameter. And it seems redundant to open command in the script anyway, please remote it.