
Nvc.Add("btn-submit-photo", "file", "image/jpeg", nvc) Here is the result: public static void HttpUploadFile(string url, string file, string paramName, string contentType, NameValueCollection nvc) ", reader2.ReadToEnd())) Īnd sample usage: NameValueCollection nvc = new NameValueCollection() Applied the refactoring with memory stream, writing directly to the request stream. There are some problems with \r\n badly positioned and spaces etc. Took the code above and fixed because it throws Internal Server Error 500. WinSCP can even generate a script from an imported FileZilla session.įor details, see the guide to FileZilla automation.Īnother option, if you are using SFTP, is the psftp.exe client from PuTTY suite. Similarly for download: How to schedule an automatic FTP download on Windows? With FTP, just replace the sftp:// with the ftp:// and remove the -hostkey="." switch. Schedule file transfers to FTP/SFTP serverĪ typical WinSCP script for upload (with SFTP) looks like: open -hostkey="ssh-rsa 2048 xxxxxxxxxxx.=".Automate file transfers to FTP server or SFTP server.FTP or SFTP? You will definitely be able to use WinSCP, as it supports all protocols that FileZilla does (and more).Ĭombine WinSCP scripting capabilities with Windows Scheduler: You have not specified, what protocol you are using. Though you can use any other client that allows automation.

