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

hagh

I can not open the conection. When I run the batch file from that machine, it works fine, but when I run it from webpage, using IIS server, it doesn't. The batch file works. It does other stuff, but the open conection comand doesnt work. Please tell me which log file you need so I can send it to you.
Thanks - Hamid
hamid.ghasemiyeh@gmail.com
martin

Then you should read the mentioned FAQ once again. I'm pretty sure it describes your problem. Otherwise I need to see the log.
hagh

thanks for the reply
Yes, When I run a batch file (locally on the webserver machine) with a call to vbscirpt text file, it works. But when I run the ASP page with the same code, it doesn't work. Here are the two files that work together:

1- Batch file:
"C:\Program Files\WinSCP\WinSCP.com" -script=C:\Inetpub\wwwroot\Test\tttt.txt

2- The vbscript(tttt.txt):
option batch on
option confirm off
option transfer binary
open sftp://ca:Ei3&29a$b@ftp.one.com:22
get TEXT.TXT C:\Inetpub\wwwroot\Test\
close
exit
martin

Re: Get problem

So can you first try to execute the script manually, not from VB?
hagh

Re: Get problem

Yes, I have looked at all the FAQ and No I don't have any log file. What should I log to find the problem?

My shell.run returns 1, and there is no error. I just cant get (download) my file. I can use the Winscp control panel to get that file directly, but I can't via VB script.
martin

Re: Get problem

Does it work if you execute the script separately? Can you post a log file and/or output of the script? Have you read the FAQ?
hagh

Get problem

I can not get the file that I am looking for and this is my code in a ASP page:
Set oFTPScriptFSO = CreateObject("Scripting.FileSystemObject")
Set oFTPScriptShell = CreateObject("WScript.Shell")
sLocalPath = "c:\Inetpub\wwwroot\ftptext\"
sFTPScript =
" option batch on
option confirm off
option transfer binary
open sftp://cab:Ei&2a$x@ftp.one.com
cd /Home/
get TEXT.TXT
close
exit
"

sFTPTempFile = "C:\Inetpub\wwwroot\Test\tttt.txt"
Set oFTPScript = oFTPScriptFSO.CreateTextFile(sFTPTempFile, True)
oFTPScript.WriteLine(sFTPScript)
oFTPScript.Close
sCmd = """C:\Program Files\WinSCP\WinSCP.com"" -script=" & sFTPTempFile
sout1 = oFTPScriptShell.run (sCmd, 1, true)
Set oFTPScript = Nothing

what is my problem?
Please let me know - Thanks