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

Author Message


this is my batch file script
F:/gem/Inbound/GEM/Templates/winscp/ /console/ |script=F:\gem\Inbound\GEM\Templates\winscp.txt /log=session.log
if errorlevel 1 gotoecho
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


Connect once manually (through the GUI). Select yes to save the key. then it should work in a batch.
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24759
Location: Prague, Czechia
Please read documentation:
Martin Prikryl

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!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License