Re: SFTP connection not working when we use script option
It's not because of the script, but because you used the
See https://winscp.net/eng/docs/scripting#configuration
/ini=nul switch, which forces you to specify the host key in the open command.
See https://winscp.net/eng/docs/scripting#configuration