you can use VBScript and a version of XMLHTTP. The following sub downloads instead of uploads, but it can give you a start:
Sub wGet(strURL, strLocalFile)
'
' Example Usage
' wGet URLtofile, LocalFileSpec
'
Set objXMLHTTP = CreateObject("MSXML2.XMLHTTP.3.0")
With objXMLHTTP
.Open "GET", strURL, False
.Send
If .Status = 200 Then
Set objStream = CreateObject("ADODB.Stream")
With objStream
.Open
.Type = 1
.Write objXMLHTTP.responseBody
.SaveToFile strLocalFile, 2
.Close
End With
Else
varToUser = MsgBox("Web server returned an error", _
vbInformation, "ASU Portable Environment Setup")
Wscript.Quit
End If
End With
Set objXMLHTTP = nothing
End Sub
2WinSCP is a complex program designed to deal with a complex set of underlying protocols. it will be a seriously non-trivial task to re-implement it, and it will almost certainly be less secure. First rule of cryptography is "never try to role your own", and if you are implementing cryptographic processes in your application, that this must be done with significant care. Additionally WinSCP ships libraries for application integration and scripting. I use WinSCP dlls in my .Net programs regularly. – Frank Thomas – 2016-10-06T14:25:21.290
Shell script on Windows? Or do you mean batch file? Anyway, do you mean it seriously, to implement a cryptography in a shell script? Or are you looking for a plain unsecure FTP? – Martin Prikryl – 2016-10-06T14:56:06.813
You can automate Winscp. What reason precludes using Winscp? What protocol do you need to use? Why do you even mention bash if you are sending from Windows. – jiggunjer – 2016-10-06T16:28:18.350
What version OS are you using? – voices – 2016-10-07T22:02:16.643