I made the correction: ssh-rsa "2048 ssh-rsa 2048".
I was able to generate log but executed bat manually. The log shows no error. But running in Task Scheduler does not generate log, it seems the script does not run.
I tested the same on 2 different computers, it did not work.
I have other bats from other applications running this way.
I am using my own account to run the script and its path is local.
Anything else I can check?
Thanks for your help!!!!
I have a script that works when I run manually. But when I start with the Windows Task Scheduler it does not work. Can you help me?
My bat: SyncToLocalScript.bat
"C:\Program Files (x86)\WinSCP\winscp.com"/script="SyncToLocalScript.txt"
My Script: SyncToLocalScript.txt
option batch abort
option confirm off
open sftp://username:password@IP -hostkey="ssh-rsa 2048 ssh-rsa 2048 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx"
synchronize local C:\sftp /