I was able to figure WinSCP automation out. For your info, here's what works:
1 Get WinSCP to generate the script for you. You'll need the line at the top as that contains the SSL certificate as well as a properly-formatted user and password authentication.
2 For some reason the instructions at the bottom of the file generated by WinSCP don't work, so instead do this;
3 Create a batch file, in my case I saved in c:\ The file has the following 3 lines:
cd Program Files (x86)\WinSCP
type get_script.txt | winscp
4 create get_script.txt in Program Files (x86)\WinSCP (the standard directory it installs in), it contains the following 5 lines:
open sftp://<the rest of that first line from step 1>
get -delete *.xml
5 your files will appear in C:\XML.
You have to use the type command in the batch file, simply listing the commands stops working as soon as you're in winscp's prompt (it has its own prompt).
I hope this comes in handy later, thank you and good luck.