Connect WinSCP console through command-line. Run batch file in it. Commands should be included in batch file for connecting with the server.
Windows – How to connect WinSCP through command line not in GUI mode
batch filecmd.exesftpwindowswinscp
batch filecmd.exesftpwindowswinscp
Connect WinSCP console through command-line. Run batch file in it. Commands should be included in batch file for connecting with the server.
Best Answer
A basic batch file for connecting to SFTP server with WinSCP scripting is like:
For details, see a guide to Automating file transfers to SFTP server.
For the
-hostkey
switch see Verifying the host key in script.Easier is to have WinSCP generate a complete transfer script or even batch file for you: