If you need to use double quotes around switch value, you have to double them. See
Also, the value of
-hostkeyis a fingerprint not a path to a file.
winscp.com /command "open sftp://firstname.lastname@example.org/ -hostkey=""ssh-rsa 2048 xx:xx:xx:xx:xx:xx:xx..."" -privatekey=""C:\bla\sqlbackup\SFTP.ppk""" "rm TEST.TXT" "put C:\bla\sqlbackup\TEST.TXT" exit
The easiest is to configure the session in WinSCP GUI and have it generate the command-line for you:
That's done it! Damn, thought I could put the hostkey in a file.
Thanks for your help