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

Re: host not found

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.
Namerofali

host not found

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 https://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.