This is just a snippet of code to automate the deployment of a website (Hugo, Jeykll, etc.) by using WinSCP. I’m using WinSCP because I need WebDAV. I want the script to connect to remote, change to the websites directory and upload the new website version from a folder (overwriting everything in the process) before disconnecting. Here is the script.