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