home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / BBS / RA / BAT2FD10.ZIP / RA1.BAT < prev    next >
Encoding:
DOS Batch File  |  1990-11-03  |  5.4 KB  |  190 lines

  1.  
  2. Rem 
  3. Rem Batchfile for Node 1
  4. Rem
  5.  
  6. Rem These batchfiles make use of a few special programs.
  7. Rem
  8. Rem DVCommand makes a window wait for xx seconds (DVCOxxxx.ZIP)
  9. Rem CD-Check detects whether there is a carrier on the other line.
  10.  
  11. Rem
  12. Rem Frontdoor is setup to exit with errorlevel 100 after incoming mail
  13.  
  14. @Echo Off
  15. C:\Dv\Dvansi
  16. Cls
  17.  
  18. Rem -----------------------------------------
  19. Rem - Clean up mess after reboot or similar -
  20. Rem -----------------------------------------
  21.  
  22. If Exist C:\Ra\Line2\Down Del C:\Ra\Line2\Down
  23. If Exist C:\Ra\Line2\GoDown Del C:\Ra\Line2\GoDown
  24.  
  25. Rem --------------------------------------------------
  26. Rem - Set COMports for DSZ and environment for RAQMX -
  27. Rem --------------------------------------------------
  28.  
  29. Set DSZPORT=1
  30. Set TCNODE=1
  31.  
  32. Rem - Main -----------------------------------------------------------
  33. :Start
  34.  
  35. Rem -----------------------------------------
  36. Rem - Check if Node 2 allows mailprocessing -
  37. Rem -----------------------------------------
  38.  
  39. If Exist C:\Ra\Line2\Mail! Goto Do_Mail
  40. If Exist C:\Fd\FdExit.100 Goto Do_Mail
  41.  
  42. :Start2
  43. C:
  44. Cd\Ra\Line1
  45. Bnuhlp /C
  46.  
  47. Ra -N1 -E250 -M*M*HC:\Fd\Fd.Exe
  48. If ErrorLevel 250 Goto AfterRA
  49. If ErrorLevel 100 Goto Do_Mail
  50. If ErrorLevel  90 Goto Maint
  51. If ErrorLevel   6 Goto End
  52. If Errorlevel   3 Goto BBS_Mail
  53. Goto End
  54.  
  55. Rem - Exit after human caller; user entered mail----------------------------
  56. :BBS_Mail
  57.  
  58. Rem - Exit after human caller-----------------------------------------------
  59. :AfterRA
  60. C:
  61. Cd\Ra\Line1
  62.  
  63. :AfterRA2
  64. Rem --------------------------------------------------------------
  65. Rem - Grab XRS uploaded mail from Node 1 and copy to inbound dir -
  66. Rem --------------------------------------------------------------
  67.  
  68. If Not Exist C:\Qmx\Line1\01e9*.* Goto AfterRA3
  69. Set QmxMail=X
  70. If Exist C:\Fd\Files\01e9.* Goto AfterRA3
  71. Copy C:\Qmx\Line1\01e9*.* C:\Fd\Files
  72. Del C:\Qmx\Line1\01e9*.*
  73.  
  74. :AfterRA3
  75. Rem --------------------------------------------------------------
  76. Rem - Grab XRS uploaded mail from Node 2 and copy to inbound dir -
  77. Rem --------------------------------------------------------------
  78.  
  79. CD-Check 2
  80. If Not Errorlevel 1 Goto AfterRA4
  81. If Not Exist C:\Qmx\Line2\01e9*.* Goto AfterRA4
  82. Set QmxMail=X
  83. If Exist C:\Fd\Files\01e9*.* Goto AfterRA4
  84. Copy C:\Qmx\Line2\01e9*.* C:\Fd\Files
  85. Del C:\Qmx\Line2\01e9*.*
  86.  
  87. :AfterRA4
  88.  
  89. Rem ----------------------------------
  90. Rem - Check if mailprocessing is due -
  91. Rem ----------------------------------
  92. If .%QmxMail%==.X Goto Do_Mail
  93. If Exist C:\Msgs\Echomail.Bbs Goto Do_Mail
  94. If Exist C:\Msgs\Netmail.Bbs Goto Do_Mail
  95. Goto Start
  96.  
  97. Rem - X100-Import and export----------------------------------------------
  98. :Do_Mail
  99. If Exist C:\Fd\FdExit.100 Del C:\Fd\FdExit.100
  100.  
  101. Rem -------------------------------------------------------
  102. Rem - Test if there is a carrier on Node 2                -
  103. Rem - If yes:  Set FDexit in case it's a mailsession, and -
  104. Rem -          Create a file "Mail!" if it's the BBS      -
  105. Rem -------------------------------------------------------
  106. CD-Check 2
  107. If Errorlevel 1 Goto Do_Mail2
  108. Rem > C:\Fd\Fd2\FdExit.170
  109. Rem > C:\Ra\Line2\Mail!
  110. Goto Start2
  111.  
  112. Rem ----------------------------------------
  113. Rem - No carrier on Node 2: Take 'er down! -
  114. Rem ----------------------------------------
  115. :Do_Mail2
  116. If Not Exist C:\Ra\Line2\Down Call Stop2.Bat
  117.  
  118.  
  119. Rem -------------------------------------------
  120. Rem - First process mail entered by BBS users -
  121. Rem -------------------------------------------
  122.  
  123. C:
  124. Cd\Fd
  125. If Exist C:\Msgs\Echomail.Bbs TosScan scan
  126. If Exist C:\Msgs\Netmail.Bbs Tsutil Export -c
  127. If Exist C:\Msgs\Netmail.Bbs Del C:\Msgs\Netmail.Bbs
  128.  
  129. TosScan Mgr
  130. TosScan Toss
  131. Tsutil Import -f
  132. If Exist Import.Xyz Tsutil Link
  133. If Exist Import.Xyz Del Import.Xyz
  134.  
  135. Rem -------------------------------------------
  136. Rem - Mail processing ready.                  -
  137. Rem - Delete the flags for Node 2 and fire up -
  138. Rem -------------------------------------------
  139. If Exist C:\Ra\Line2\Mail! Del C:\Ra\Line2\Mail!
  140. If Exist C:\Ra\Line2\Down Del C:\Ra\Line2\Down
  141. If Exist C:\Fd\Fd2\FdExit.* Del C:\Fd\Fd2\FdExit.*
  142. If Exist C:\Fd\FdExit.* Del C:\Fd\FdExit.*
  143. Set QmxMail=
  144.  
  145. Goto Start
  146.  
  147. Rem - X90-Nightly Maintenance----------------------------------------------
  148. :Maint
  149. If Not Exist C:\Ra\Line2\Down Call Stop2.Bat
  150. C:
  151. cd\fd
  152.  
  153. Rem -------------------------------------------------------------
  154. Rem - Do whatever needs to be done in maintenance               -
  155. Rem - I compile the nodelist and do some household cleanup here -
  156. Rem -------------------------------------------------------------
  157.  
  158. TSMaint Kill
  159. Tsutil Kill NETMAIL -d 45 -k
  160. Tsutil Maint -f -r
  161. If Not ErrorLevel 1 Goto Night2
  162.  
  163. Rem -----------------------------------------------------
  164. Rem - Tsutil Maint sometimes takes too much memory      -
  165. Rem - In that case it will exit with an errorlevel      -
  166. Rem - So why don't we use the slow method in that case? -
  167. Rem -----------------------------------------------------
  168. Tsutil Kill -S
  169. Tsutil Pack -f -r
  170.  
  171. :Night2
  172. Cd\Ra
  173. RaUser -S -P -D75
  174. Copy Remotlog.Cf1 Remotlog.Cfg
  175. Remotlog
  176. Copy Remotlog.Cf2 Remotlog.Cfg
  177. Remotlog
  178.  
  179. Rem --------------------------------------------------------
  180. Rem - All done. Delete signal flags and restart the mailer -
  181. Rem --------------------------------------------------------
  182.  
  183. If Exist C:\Ra\Line2\Down Del C:\Ra\Line2\Down
  184. Goto Start
  185.  
  186. Rem - Exit batchfile-------------------------------------------------------
  187. :End
  188.  
  189.  
  190.