home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / ckscripts / recover < prev    next >
Text File  |  2020-01-01  |  2KB  |  51 lines

  1. ask \%u { username: }
  2. askq \%p { \%u's password: }
  3.  
  4. ; Settings for entire session.
  5. ;
  6. define \%s 20          ; Seconds to pause between each try
  7. define \%n 7654321      ; Phone number
  8. set port com1          ; Communication port
  9. set modem pp14400      ; Modem type (dial with PP14400.SCR)
  10.  
  11. set file type binary      ; File transfer mode must be binary
  12. set input timeout quit      ; This is just to keep the script program short...
  13. set count 50          ; Try up to 50 times to send the file
  14. goto nomsg          ; Skip message the first time
  15.  
  16. :LOOP              ; Come here to redial
  17. hangup              ; Give the phone line a rest
  18. echo CONNECTION BROKEN.
  19. echo Pausing for \%s seconds...
  20. sleep \%s
  21. Echo redialing...
  22.  
  23. :NOMSG
  24. dial \%n          ; Dial the phone number
  25. if fail goto AGAIN      ; Keep trying...
  26. output \13          ; System answered, send a carriage return
  27. input 15 login:          ; Get UNIX login prompt
  28. output \%u\13          ; Send user ID
  29. input 8 Password:      ; Get UNIX password prompt
  30. output \%p\13          ; Send password
  31. input 60 {$ }          ; Get UNIX system prompt
  32. cd \budget          ; CD to desired local source directory
  33. output cd budget\13      ; and remote destination directory
  34. input 8 {$ }          ; Get system prompt
  35. out kermit -r\13      ; kermit -r(eceive) on remote system
  36. input 10 KERMIT READY      ; Wait for READY message
  37. pause 1              ; Plus a second for safety
  38. resend fy9495.wks      ; RESEND the file
  39. if success goto done      ; Success means file is completely transferred
  40.  
  41. :AGAIN
  42. if count goto LOOP      ; Otherwise, try again.
  43. Stop 1 Too many tries.      ; Too many tries, give up.
  44.  
  45. :DONE
  46. echo File transferred OK  ; Success, give message
  47. output exit\13          ; Log out from remote computer
  48. pause 5              ; Give it time...
  49. hangup              ; Hang up
  50. stop 0 Script succeeded      ; Finished, the end.
  51.