Topic "fail to connect sftp folder by using batch file"

Author Message
Boreddy

Guest


this is my batch file script
F:/gem/Inbound/GEM/Templates/winscp/WinSCP.com /console/ |script=F:\gem\Inbound\GEM\Templates\winscp.txt /log=session.log
if errorlevel 1 gotoecho
:error
echo Upload failed, keeping local files


in my log i am seeing this messges:

If you trust this host, press Yes. To connect without adding host key to the cache, press No. To abandon the connection press Cancel.

how can i select the any one of the option

please help me very urgent
T

Guest


Connect once manually (through the GUI). Select yes to save the key. then it should work in a batch.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
Please read documentation:
https://winscp.net/eng/docs/scripting#hostkey
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

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