home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / BINK.ZIP / BBS.CMD < prev    next >
OS/2 REXX Batch file  |  1992-01-06  |  2KB  |  83 lines

  1. @Echo off
  2. Set BBS=\Max\
  3. Set BINKLEY=\Bink\
  4. Set RBuf=4096
  5. Set TBuf=1024
  6. Set SnoopPipe=\Pipe\BBS
  7.  
  8. Set Path=\Bink;\Max;%Path%
  9.  
  10. Set Node=1
  11.  
  12. CD \Bink
  13. REM Insure not recursive invocation
  14. If Exist INBINK Goto EXIT
  15.  
  16. \OS2\Mode CO80,50
  17.  
  18. :LOOP
  19. REM Delete any leftover *.REQ files from Matrix File area.
  20. If Exist \Bink\Inbound\*.REQ Del \Bink\Inbound\*.REQ
  21.  
  22. CD \Bink
  23. Echo INBINK >INBINK
  24. \OS2\MODE COM1:19200,N,8,1,TO=ON,XON=OFF,DTR=OFF,IDSR=OFF,ODSR=OFF,OCTS=ON,RTS=HS,BUFFER=AUTO
  25. BTP %1 Dynam Share Unattended
  26.  
  27. If ERRORLEVEL 30 Goto MAIL_POLL
  28. If ERRORLEVEL 20 Goto NIGHT
  29. If ERRORLEVEL 14 Goto MAILIN
  30. If ERRORLEVEL 13 Goto MAILIN
  31. If ERRORLEVEL 11 Goto AFTERBINK
  32. If ERRORLEVEL 10 Goto LOOP
  33. If ERRORLEVEL 0 Goto AFTERBINK
  34. Goto LOOP
  35.  
  36. :AFTERBINK
  37.  
  38. If ERRORLEVEL 2 Echo ERRORLEVEL is 2 to 5.
  39. If ERRORLEVEL 2 Echo ERRORLEVEL is 2 to 5. >> ERROR.LOG
  40. If ERRORLEVEL 2 Goto LOOP
  41.  
  42. REM This is the common CTRL-C Exit.
  43. Goto EXIT:
  44.  
  45. rem ------------------------------------------------------------------------
  46. :NIGHT -- The first daily event.
  47. If Exist \max\active??.BBS Goto Skip_Pack
  48. \MAX\MAXUSORT \MAX
  49.  
  50. :Skip_Pack
  51. If Exist Outbound\*.NOT Del Outbound\*.NOT
  52. REM Delete any connection files in Outbound.
  53. If Exist \bink\outbound*.?$? Del \bink\outbound\*.?$?
  54. rem delete old messages and renumber.
  55. Call Compress.Cmd
  56.  
  57. rem Make sure any left-over mail is bundled up and sent out.
  58. cd \max\Squish
  59. Squish out squash
  60. goto loop
  61.  
  62. rem ------------------------------------------------------------------------
  63. :MAIL_POLL
  64. cd \max\squish
  65. squish out squash
  66. cd \bink
  67. Omail POLL 109/347
  68. Goto loop
  69.  
  70. rem ------------------------------------------------------------------------
  71. :MAILIN -- Exit after ARCMail or Packet received, or partial export.
  72. cd \max\squish
  73. squish in out squash link
  74. cd \bink
  75. rem Remapper 30039 -cp -fp
  76. goto loop
  77.  
  78. rem ------------------------------------------------------------------------
  79. :EXIT
  80. If Exist INBINK Del INBINK >Nul:
  81. \OS2\Mode CO80,50
  82. Echo Returning to OS/2
  83.