My apologies, I thought I downloaded the latest version from your site yesterday. Somehow I ended up with version 5.1.8. I have version 5.5.0 now. Thank you for your reply.
I am running WinSCP version 5.1.8 and am trying to use the following command in a batch file
winscp.exe /console /command "option batch on" "option confirm off" "open sftp://root:MyPasswordHere@ServerNameHere/tmp -hostkey=*" "put D:\Some\File\OnThe\Server.txt" "exit"
I have also tried a variety of quote marks, like this
winscp.exe /console /command "option batch on" "option confirm off" "open sftp://root:MyPasswordHere@ServerNameHere/tmp -hostkey="*"" "put D:\Some\File\OnThe\Server.txt" "exit"
And this, which I found in a post on this forum
winscp.exe /console /command "option batch on" "option confirm off" "open sftp://root:MyPasswordHere@ServerNameHere/tmp -hostkey=""*"" "put D:\Some\File\OnThe\Server.txt" "exit"
None of these work, the script still stops and prompts to accept the new host key. If I manually accept the host's key and save it in the cache, then run the script again it works fine.