unable to use winscp in windows task scheduler

Advertisement

siddhant
Guest

unable to use winscp in windows task scheduler

Hello,

I am new to WinSCP. I am trying to schedule a normal put job using winscp. I have cretard a .bat file using below query.

winscp.com /log=F:\test\winscp.log /script=sftp.txt

In sftp.txt i have used below query.

option batch on
option confirm off
open NFSFTP
put F:\test\BSCC.txt /cs/test/
EXIT

When i execute the batch manually the file was delivered to SFTP but after scheduling the task in windows task scheduler the job can't send the file to SFTP.

Please advise.

Thanks

Reply with quote

Advertisement

siddhant
Guest

For your information i could not find the .ini file in the system. Is it causing the task scheduler job not to succeed. I have tried every step but failed. Should I create a new .ini file?

Thanks.

Reply with quote

siddhant
Guest

Hello,

I am still struggling with this. In a forum i found that if you are using private key you need copy the finger print to sftp server keys and you need to explicitly add private key in the script. Is it the right way to do the automation. Please help.

Thanks

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,426
Location:
Prague, Czechia

siddhant wrote:

I am still struggling with this. In a forum i found that if you are using private key you need copy the finger print to sftp server keys and you need to explicitly add private key in the script. Is it the right way to do the automation. Please help.
Yes. That's the recommended way.
The easiest is to have WinSCP GUI generate a script template for you.
https://winscp.net/eng/docs/ui_generateurl#script

See also
https://winscp.net/eng/docs/faq_scheduler
https://winscp.net/eng/docs/scripting#configuration

Reply with quote

siddhant
Guest

Hello Martin,

File(s) > File Names > Generate File URL tab has been greyed out for me. How to activate this option?

Thanks

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,426
Location:
Prague, Czechia

siddhant wrote:

File(s) > File Names > Generate File URL tab has been greyed out for me. How to activate this option?
This has nothing to do with this thread. Anyway, the command is disabled, when you have no file selected (or when the remote panel is not active).

Reply with quote

Advertisement

You can post new topics in this forum