home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / mskermit / msires.scr < prev    next >
Text File  |  2020-01-01  |  2KB  |  55 lines

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