Topic "unable to use winscp in windows task scheduler"

Author Message
siddhant

Guest


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
Advertisements
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.
siddhant

Guest


I have gone through some forums.

But I am unable to do this . Please help.

https://winscp.net/forum/viewtopic.php?t=14412
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
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26480
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
siddhant

Guest


Thanks Martin. I resolved the issue and able to send file to SFTP.
siddhant

Guest


Hello Martin,

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

Thanks
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26480
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).
Advertisements

You can post new topics in this forum






Search

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License