; Ask for username and password. ; This happens only once. ; ask \%u { username: } askq \%p { \%u's password: } ; ; Settings for entire session. ; define \%s 20 ; Seconds to pause between each try set modem hayes ; Modem type set port com1 ; Communication port set speed 19200 ; Speed set input echo on set file type binary ; Binary-mode file transfer set count 10 ; Try up to 10 times goto nomsg ; Skip message the first time :LOOP hangup echo CONNECTION BROKEN. echo Pausing for \%s seconds... sleep \%s Echo redialing... set input timeout proceed :NOMSG dial T[CUNIX] ; Dial the number if fail goto again ; Keep trying... ; ====== :TS def \%c 15 output \13 input 1 > if success goto OK decrement \%c write screen { [\%c]} if > \%c 0 goto TS stop 1 Can't wake up terminal server :OK set flow xon/xoff output rlogin watsun\13 ; ====== ;; output \13 ; ... set input timeout quit input 15 login: output \%u\13 input 8 Password: output \%p\13 input 60 {$ } cd /temp output cd temp\13 input 8 {$ } out ww -r\13 input 10 KERMIT READY pause 1 resend msvibm.zip if success goto done :AGAIN if count goto loop echo Too many tries, giving up. stop 1 :DONE echo File transferred successfully output exit\13 pause 5 hangup stop 0