Failed to access correct remote destination

Advertisement

joshcavanagh
Joined:
Posts:
2

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.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
27,253
Location:
Prague, Czechia

Re: Failed to access correct remote destination

How do you use WinSCP 3.5 from VBS script?
_________________
Martin Prikryl

Reply with quote

joshcavanagh
Joined:
Posts:
2

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

'#################################

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,253
Location:
Prague, Czechia

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

Reply with quote

Advertisement

You can post new topics in this forum