Topic "host not found"

Author Message
Namerofali

Guest


I have created a VBScript to upload my files from Windows XP/Sp3 to the secure server.

This is the code in my script:
Set objShell = CreateObject("WScript.Shell")
objShell.Run """C:\Program Files\WinSCP3\WinSCP.com""" & "/"&command &" option confirm off " & "option batch on " & "option transfer ascii " & "open " & " sftp:user_name:myPassword@ftp.host:22" &" put "& "S:\CashNet\balance.dat " &"/" & files & "/" & "exit"
'sftp://watc_prod:1bWnMH1TvQ@ftp.cashnet.com put & ""S:\CashNet\balance.dat"" & /files/ exit"
Set objShell = Nothing


When I execute the script, the dos window displays these messages:
Searching for host
Host not found
Winscp>

I checked the http://winscp.net/eng/docs/message_host_does_not_exist page, but both examples are the same.
Per the security administrator, I should be able to access any external site from my computer.

I can take the command in the objShell.Run statement, remove the ampersands and extra quotes and run it successfully from the start/run line.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
I do not know VBScript good enough. Though I belive that you syntax is wrong.
- What is in "command" variable? There has to be a "command" string, otherwise your code won't work. But I do not understand why you use variable for that.
- Also you do not enclose the individual commands to quotes.
- There's no space before exit command.
_________________
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