scripts proplem. [2]
scripts proplem.
Tuesday, October 18, 2011 2:37 AM - howard
xsh.Session.Open("/s .\sftp@110.123.123.123.xsh")
xsh.Screen.Synchronous(True)
xsh.Screen.WaitForString("Type `help' to browse available commnands.")
xsh.Screen.Send "ls" & chr(13)
xsh.Session.Sleep 500
xsh.Screen.Send "put test.txt" & chr(13)
xsh.Screen.WaitForString("sftp: sent")
I want to open a sftp session, and put test.txt. I want get sftp prompt "sftp: sent", but sometimes i can not get sftp prompt "ftp: sent ...", this line lost, why?
Program Ver. : Xshell 4
xsh.Screen.Synchronous(True)
xsh.Screen.WaitForString("Type `help' to browse available commnands.")
xsh.Screen.Send "ls" & chr(13)
xsh.Session.Sleep 500
xsh.Screen.Send "put test.txt" & chr(13)
xsh.Screen.WaitForString("sftp: sent")
I want to open a sftp session, and put test.txt. I want get sftp prompt "sftp: sent", but sometimes i can not get sftp prompt "ftp: sent ...", this line lost, why?
Program Ver. : Xshell 4
Re: scripts proplem.
Wednesday, October 19, 2011 1:34 AM - Support
Please try using the following script. Use the absolute session path.
xsh.Session.Open "/s $FULL_SESSION_PATH$"
xsh.Screen.Synchronous = True
xsh.Screen.WaitForString "Type `help' to browse available commnands."
xsh.Screen.Send "ls"
xsh.Screen.Send VbCr
xsh.Session.Sleep 500
xsh.Screen.Send "put test.txt"
xsh.Screen.Send VbCr
xsh.Screen.WaitForString "sftp: sent"
---
Technical Support
xsh.Session.Open "/s $FULL_SESSION_PATH$"
xsh.Screen.Synchronous = True
xsh.Screen.WaitForString "Type `help' to browse available commnands."
xsh.Screen.Send "ls"
xsh.Screen.Send VbCr
xsh.Session.Sleep 500
xsh.Screen.Send "put test.txt"
xsh.Screen.Send VbCr
xsh.Screen.WaitForString "sftp: sent"
---
Technical Support
Re: scripts proplem.
Thursday, October 20, 2011 7:15 PM - howard
thanks, that ok.
Previous views: 233