home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS 1992 June / SIMTEL_0692.cdr / msdos / kermit / tskerm24.arc / PUTBIN.CMD < prev    next >
Encoding:
Text File  |  1989-12-21  |  1.7 KB  |  44 lines

  1. ;
  2. ; PUTBIN.CMD by Prof. Timo Salmi, ts@chyde.uwasa.fi, Thu 21-12-1989
  3. ; A script to send a binary file to a Unix host from your PC
  4. ;
  5. ; To run putbin.cmd script give kermit command:
  6. ;     take putbin.cmd [filename]
  7. ; Or if you have run take zset.cmd then just give kermit command:
  8. ;     putbin [filename]
  9. ;
  10. ; Error handlers:
  11. def errstop1 echo \%1\7\13, define \%1, stop
  12. if not defined \%1 ask \%f Put which binary file?
  13. if defined \%1 define \%f \%1
  14. if not defined \%f errstop1 {Error: You have not defined the filename variable}
  15. ;
  16. def errstop2 echo \%1\7\13, define \%f, define \%1, stop
  17. if not exist \%f errstop2 {Error: File \%f not found}
  18. ;
  19. set take-echo on         ;Show what is happening
  20. clear                    ;Clear the input buffer
  21. set parity even          ;CHANGE as your system might require
  22. set send packet 1000     ;Use long packets
  23. set take-echo off        ;Enough of displaying the comments
  24. ;
  25. pause 1                            ;Let's not be too hasty about it :-)
  26. output kermit\13                   ;Invoke Unix C-kermit
  27. pause 1                            
  28. output set file type binary\13     ;E.g. if it is and .arc file
  29. pause 1
  30. output set parity even\13          ;CHANGE as your system might require
  31. pause 1
  32. output set receive packet 1000\13  ;Use long packets (C-Kermit)
  33. pause 1
  34. output receive\13                  ;Start receiving by host
  35. pause 1
  36. send \%f                           ;Start sending from your PC
  37. pause 5                            ;A longer pause is required here
  38. output quit\13                     ;Quit host kermit
  39. pause 1
  40. define \%f                         ;Release filename
  41. define \%1                         ;Release parameter
  42. pause 1
  43. echo \13Script PUTBIN.CMD by Prof. Timo Salmi, Done
  44.