Topic "host not found"

Author Message


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\""" & "/"&command &" option confirm off " & "option batch on " & "option transfer ascii " & "open " & "" &" put "& "S:\CashNet\balance.dat " &"/" & files & "/" & "exit"
's 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

I checked the 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.
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26890
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

You can post new topics in this forum


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!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License