Connect once manually (through the GUI). Select yes to save the key. then it should work in a batch.
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