home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / pcboard / rnet109u.zip / MAILRUN.BAT < prev    next >
DOS Batch File  |  1993-01-26  |  3KB  |  81 lines

  1. echo off
  2. cls
  3. echo %0 Processing... %1   [Example batch for event]
  4. rem ┌─────────────────────────────────────────────────────────────────────────┐
  5. rem │  Sample MAILRUN.BAT file for executing RNET/Qmail/PCBoard based echo    │
  6. rem │  conferencing.  This batch file should be executed daily or as often    │
  7. rem │  as needed to import/export mail to/from your host system.              │
  8. rem └─────────────────────────────────────────────────────────────────────────┘
  9.  
  10. if '%1'=='' goto BADID
  11. goto MAIL
  12.  
  13. :BADID
  14. echo ┌────────────────────────────────────────────────────────────────────────┐
  15. echo │ Warning!  This batch file requires the host packet ID as a parameter!  │
  16. echo └────────────────────────────────────────────────────────────────────────┘
  17. echo Examples:
  18. echo           %0 FTL        (for Faster-Than-Light as host)
  19. echo           %0 TRP        (for The Right Place as host)
  20. echo           %0 EXECNET    (for Executive Network as host)
  21. echo %0 started without host ID parameter! >> ERROR.LOG
  22. goto ABORTMAIL
  23.  
  24. :MAIL
  25.  
  26. e:
  27. cd \rnet
  28.  
  29. rem ┌─────────────────────────────────────────────────────────────────────────┐
  30. rem │ Export mail which is for your host.  Finds mail in conferences which    │
  31. rem │ needs to be sent up to host system.  If the *.REP packet is present,    │
  32. rem │ RNET will automatically append new mail to the packet.                  │
  33. rem └─────────────────────────────────────────────────────────────────────────┘
  34.  
  35. RNET EXPORT %1
  36.  
  37. rem ┌─────────────────────────────────────────────────────────────────────────┐
  38. rem │ Send *.REP packet up to host and download *.QWK packet for importing.   │
  39. rem │ Replace this with your terminal program and script designed for this.   │
  40. rem │ Whatever your terminal program and script, if the REP packet is         │
  41. rem │ successfully uploaded, you MUST delete the REP packet or RNET will      │
  42. rem │ append tomorrows mail to the end!  You may simply rename or move the    │
  43. rem │ REP packet also.                                                        │
  44. rem └─────────────────────────────────────────────────────────────────────────┘
  45.  
  46. echo Removing any previous %1.QWK packets since they should not exist yet!
  47. if exist %1.QW? erase %1.QW?
  48.  
  49. rem ┌─────────────────────────────────────┐
  50. rem │ assumes script called (host_id).slc │
  51. rem └─────────────────────────────────────┘
  52.  
  53. echo Calling host...  using Telix script %1.slc  [in e:\telix\]
  54. cd \telix
  55. telix -s%1
  56. cd \rnet
  57.  
  58. rem ┌─────────────────────────────────────────────────────────────────────────┐
  59. rem │ Now IMPORT any new mail aquired from the host (*.QWK)                   │
  60. rem └─────────────────────────────────────────────────────────────────────────┘
  61.  
  62. if not exist %1.QW? goto ABORTMAIL
  63.  
  64. RNET IMPORT %1
  65.  
  66. rem ┌─────────────────────────────────────────────────────────────────────────┐
  67. rem │ An error is reported if the QWK still exists after packet processing is │
  68. rem │ completed.  This assumes that you have KILLQWK=YES in your config.      │
  69. rem └─────────────────────────────────────────────────────────────────────────┘
  70.  
  71. if exist %1.QWK echo *** ERROR ***  QWK packet still exists!
  72. if exist %1.QWK echo *** ERROR ***  QWK packet still exists! >>ERROR.LOG
  73.  
  74. :ENDOFMAIL
  75.  
  76. echo %0 Processing of %1 Completed...,  returning to c:\pcb\ directory.
  77. :ABORTMAIL
  78. c:
  79. cd\pcb
  80.  
  81.