Topic "Failed to access correct remote destination"

Author Message
joshcavanagh
[View user's profile]

Joined: 2008-02-15
Posts: 2
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.
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24554
Location: Prague, Czechia
How do you use WinSCP 3.5 from VBS script?
_________________
Martin Prikryl
joshcavanagh
[View user's profile]

Joined: 2008-02-15
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

'#################################
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24554
Location: Prague, Czechia
You use pscp. It has nothing to do with WinSCP. Anyway I do not know how to help you.
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License