You use pscp. It has nothing to do with WinSCP. Anyway I do not know how to help you.
I'm using the below code in vb script which i'm using to send the files over to a remote server:
'#### Function to SCP File #######
Function scpFile(fileName)
Set WshShell = WScript.CreateObject("WScript.Shell")
strRunSCP = "pscp -p -v -pw pwld39Dq " & fileName & " LoginID@x.x.x.x:/cygdrive/f/FtpRoot/SanctionResponse/"
'x.x.x.x is the IP of the remote machine
Cmd = "%comspec% /c " & strRunSCP
intRun = WshShell.Run(Cmd, 0, True)
WScript.StdOut.Writeline "Run status is " & intRun
scpFile = intRun
End Function
'#################################
How do you use WinSCP 3.5 from VBS script?
Hi,
I'm able to connect to the correct remote machine with Login name and password. However when i try to send files to the same remote machine by executing a vbs script, it goes to another remote machine. Both remote machines are with same login accounts and having different IP address.
I'm using WinSCP v3.5.0.
Please help.
Thanks.