WinSCP with Windows task schedule.

Advertisement

adrianoebm
Joined:
Posts:
1
Location:
Brasil

WinSCP with Windows task schedule.

Hello everyone, I really need help on this.
I have a Task.bat that have this...
winscp.exe /script=SyncFromRM.txt
And a SyncFromRM.txt file with this...
#Resources Can be Found here - https://winscp.net/eng/docs/scripting
option batch abort
option confirm off
open ftps://rm_exportaXXX:clXXX@2019@ounXXX-prd-ftp.totvscXXXd.com.br -hostkey="ssh-rsa 2048 XX:5c:24:XX:06:36:XX:ba:c6:92:9c:67:2a:47:d8:f4:03:fe:64:61"
synchronize local C:\bloqueio_libera_user_RM /gerador_saida
exit
(Of course i replaced the key here with XX)
My question is...
When I click on the .bat it works but when I create a task it doesn't.
Based on the above information how should I create the task?

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,478
Location:
Prague, Czechia

Re: WinSCP with Windows task schedule.

Start here https://winscp.net/eng/docs/faq_scheduler
If you want out help, we need log files.
My wild guess is that your FTPS server does not have a certificate signed by a trusted authority, so the script fails because it does not contain fingerprint of the untrusted certificate. Note that with FTPS, you need -certificate with certificate fingerprint, not -hostkey (which is for SSH host key fingerprint).
See https://winscp.net/eng/docs/scripting#hostkey

Reply with quote

Advertisement

You can post new topics in this forum