Missing data from .Execute return (wodSSH / wodSSH.NET)
If i use (in VBScript):
Set connSSH = CreateObject("WeOnlyDo.wodSSHCom")
connSSH.Hostname = IP
connSSH.Protocol = 4 'ssh
connSSH.TerminalType = "TTY"
connSSH.Blocking = True
connSSH.TimeOut = 240
connSSH.StripNull = True
connSSH.AllocatePty = False
connSSH.Login = "user"
connSSH.Password = "password"
connSSH.Prompt = "regex:user@[A-Z]+\d+\s+[Cc]\:\\.+\>"
connSSH.LicenseKey = "xxxx.xxxx.xxxx.xxxx"
connSSH.Connect
connSSH.WaitFor "regex:user@[A-Z]+\d+\s+[Cc]\:\\.+\>"
bufferSSH = connSSH.Execute("dir /s C:\folder\" & file.csv" & VbCrLf, "regex:user@[A-Z]+\d+\s+[Cc]\:\\.+\>$")
bufferSSH shows:
Volume in drive C has no label.
Volume Serial Number is 881A-0E79
But if i SSH into it manually i see:
user@MACHINE01 C:\folder>dir /s C:\
Volume in drive C has no label.
Volume Serial Number is 881A-0E79
File Not Found
user@MACHINE01 C:\folder>
Why is that? How do i pick up the "File Not Found"? I have no trouble picking up data from other commands. If the file existed and on other commands i would pick up the rest of the return with no issue.
Missing data from .Execute return
Hi.
I can't say without trying or debugging. But I suspect problem could be elsewhere where you're not expecting it to happe (such as that vbcrlf produces two command prompt replies instead of one).
Anyway, why don't you, for a test, instead of Execute use Send with exact same data ,and then call Receive several times (until it times out). Is expected result received from the server, or perhaps in received data you see the explaination why Execute returned too fast?
Jasmine