| |||
Expect error Posted by CS (CS), 27 June 2005 I am having a problem in a expect scripts. The script essentially spawns a ftp process and uses it to transfer files. The env details are: OS: windows 2003 enterprise edition, version 5.2, sp1, v1 ActiveTcl : 8.4.6.1 Expect4Win: 1.0 I have been able to run the scripts from another Server which has same configuration. The output shows : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >expect: does "" (spawn_id exp4) match glob pattern "ftp>"? no > expect: read eof > expect: set expect_out(spawn_id) "exp4" > expect: set expect_out(buffer) "" Thanks for the help Posted by admin (Graham Ellis), 27 June 2005 Is it the same FTP client that you're using on the two machines?Hard to give much of an answer without seening any source code ... Posted by CS (CS), 28 June 2005 Please find below the source code :--------------------- package require Expect exp_internal 1 set exp::winnt_debug 1 set timeout 10; spawn ftp -i; ##Put hostname or ip string here set host 192.168.8.35; set username hpbi; set password hpbi123; expect "ftp>" exp_send "open $host\r" expect { timeout { puts "script has timed out looking for User"; } "User " { exp_send "$username\r" } } expect { timeout { puts "script has timed out looking for Password"; } "Password" { exp_send "$password\r" puts "\nFound Password string"; } } expect { timeout { puts "Failed to validate account on remote site : Timed out."; } "421 Service not available" { puts "Failed to validate account on remote site : Service not available."; } "530 Login incorrect" { puts "Failed to validate account on remote site: Login incorrect."; } "530 User $username cannot log in" { puts "Failed to validate account on remote site : Login incorrect."; } "230 User $username logged in" { set outcome 1; puts "Validated account on remote site "; } } puts "finito"; ------------------ Posted by admin (Graham Ellis), 28 June 2005 Does the FTP work manually on the machine that's causing the problem? Is the FTP client in the path?Posted by CS (CS), 28 June 2005 Yes the FTP is working fine manually.This page is a thread posted to the opentalk forum
at www.opentalk.org.uk and
archived here for reference. To jump to the archive index please
follow this link.
| |||
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho |