script .bat does not run with windows task scheduler
Hello,
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"
quit
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 /
exit
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"
quit
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 /
exit