Turn on session logging to file and inspect the log. If you do not find anything, post it here.
- martin
Set objArgs = WScript.Arguments
'WScript.Echo WScript.Arguments.Count
myFolder = Split(objArgs(0),"\")
intIndex = Ubound(myFolder)
WScript.Echo myFolder(intIndex)
Set shell = WScript.CreateObject("WScript.Shell")
'run (make it log to XML)
set exec = shell.Exec("""C:\Program Files\WinSCP\WinSCP.exe""")
' feed the commands
exec.StdIn.Write("option batch abort\n" + "open Nas\n" +"ls /share/HDA_DATA/'test\n" +"exit\n")
'wait until it finishes and collect its output
set output = exec.StdOut.ReadAll()
'optionally print the output
WScript.Echo(output)
var exec = shell.Exec("""C:\Program Files (x86)\WinSCP\WinSCP.exe""")
exec.StdIn.Write("option batch abort\n" + "open Nas\n" +"ls /share/HDA_DATA/Test\n" +"exit\n")
Set objArgs = WScript.Arguments
'WScript.Echo WScript.Arguments.Count
myFolder = Split(objArgs(0),"\")
intIndex = Ubound(myFolder)
WScript.Echo myFolder(intIndex)
Set shell = WScript.CreateObject("WScript.Shell")
'run (make it log to XML)
shell.Exec("""C:\Program Files (x86)\WinSCP\WinSCP.exe""")
' feed the commands
exec.StdIn.Write("option batch abort\n" + "open Nas\n" +"ls /share/HDA_DATA/Test\n" +"exit\n")
'wait until it finishes and collect its output
StdOut.ReadAll()
'optionally print the output
WScript.Echo(output)