Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

You use pscp. It has nothing to do with WinSCP. Anyway I do not know how to help you.
joshcavanagh

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

'#################################
martin

Re: Failed to access correct remote destination

How do you use WinSCP 3.5 from VBS script?
joshcavanagh

Failed to access correct remote destination

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.