home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / comm / qns311.zip / QNS.BAT < prev    next >
DOS Batch File  |  1991-02-19  |  5KB  |  165 lines

  1. @echo OFF
  2.  cls
  3. :┌──────────────────────────────────────────────────────────────────────────┐
  4. :│ QNS.BAT       Copyright 1988-1991 by Rik Brown                           │
  5. :│                                                                          │
  6. :│               QNS.BAT main batch file for Qmodem Networking Script       │
  7. :└──────────────────────────────────────────────────────────────────────────┘
  8.  
  9. :------------------------------------------------------------------------
  10. : BE SURE TO REVISE THE DRIVE/DIRECTORIES TO MATCH YOUR OWN REQUIREMENTS.
  11. :------------------------------------------------------------------------
  12.  
  13.  if [%1]==[] goto ERRORPARM
  14.  
  15.  rem Make environment variables
  16.  
  17.  set QNSMAIL=
  18.  set QNS%1=@
  19.  
  20.  if [%QNSMIDI%]==[@]    set QNSMAIL=RELAY
  21.  if [%QNSMUSIC%]==[@]   set QNSMAIL=RNET
  22.  if [%QNSSALTAIR%]==[@] set QNSMAIL=RNET
  23.  if [%QNSTRAVEL%]==[@]  set QNSMAIL=RNET
  24.  
  25. :----------------------------------------------------------------------------
  26. : You may add/change/delete support for any PCBoard BBS by changing the name
  27. : of the CONFIGFILEs above. For example, the name of the CONFIGFILE embedded
  28. : in [%QNSTRAVEL%] is TRAVEL. For a board with a CONFIGFILE named HOWARD
  29. : and using RNET you could add above the following line:
  30. :
  31. :            if [%QNSHOWARD%]==[@]  set QNSMAIL=RNET
  32. :----------------------------------------------------------------------------
  33.  
  34.  set QNSCALL=
  35.  set QNSIMPORT=
  36.  if not [%2]==[] set QNS%2=#
  37.  
  38.  if [%QNSCALL%]==[#]    set QNSOPTION=CALL
  39.  if [%QNSIMPORT%]==[#]  set QNSOPTION=IMPORT
  40.  
  41.  if [%QNSMAIL%]==[RNET]  goto RNET%QNSOPTION%
  42.  if [%QNSMAIL%]==[RELAY] goto RELAY%QNSOPTION%
  43.  if [%QNSMAIL%]==[USER]  goto USER
  44.  
  45.  rem Otherwise drop to ERRORPARM
  46.  
  47. :ERRORPARM
  48.  echo      Your command: QNS.BAT %1 %2
  49.  echo ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
  50.  echo ▓▓▓┌──────────────────────────────────────────────────────────┐▓▓▓▓
  51.  echo ▓▓▓│                          (1)          (2)                │░░▓▓
  52.  echo ▓▓▓│        Usage: QNS.BAT CONFIGFILE [IMPORT/CALL/USER]      │░░▓▓
  53.  echo ▓▓▓│                                                          │░░▓▓
  54.  echo ▓▓▓│ PARAMETER 1   The QNS configfile in your Qmodem script   │░░▓▓
  55.  echo ▓▓▓│  (Required)   directory. It must be pre-configured for   │░░▓▓
  56.  echo ▓▓▓│               the BBS to which you are calling.          │░░▓▓
  57.  echo ▓▓▓│                                                          │░░▓▓
  58.  echo ▓▓▓│ PARAMETER 2   If you are a NETWORK SYSOP who will not    │░░▓▓
  59.  echo ▓▓▓│  (Optional)   be exporting messages (or have already     │░░▓▓
  60.  echo ▓▓▓│               done so manually or from a previous mail   │░░▓▓
  61.  echo ▓▓▓│               run) and wish to jump directly to the      │░░▓▓
  62.  echo ▓▓▓│               network IMPORT or CALL phase of this       │░░▓▓
  63.  echo ▓▓▓│               batch file, then indicate IMPORT or CALL.  │░░▓▓
  64.  echo ▓▓▓│                                                          │░░▓▓
  65.  echo ▓▓▓│               If you are a USER utilizing an offline     │░░▓▓
  66.  echo ▓▓▓│               reader to up/download messages, indicate   │░░▓▓
  67.  echo ▓▓▓│               USER for this parameter.                   │░░▓▓
  68.  echo ▓▓▓│                                                          │░░▓▓
  69.  echo ▓▓▓└──────────────────────────────────────────────────────────┘░░▓▓
  70.  echo ▓▓▓▓▓▓░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▓▓
  71.  echo ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
  72.  goto end
  73.  
  74. :----------------------------------------------------------------------------
  75. : Those calling in a non-network sysop capacity should edit the DRIVE &
  76. : DIRECTORY locations between here and the next line to match the proper
  77. : locations on your hard disk.
  78.  
  79. :USER
  80.  C:
  81.  cd \QWKMAIL
  82.  echo Backing up %1.QWK files....
  83.  if exist %1.qwk copy %1.qwk %1.qw1 >nul
  84.  if exist %1.qwk del %1.qwk
  85.  if exist c:\QWKMAIL\%1.cap del c:\QWKMAIL\%1.cap
  86.  
  87.  R:
  88.  cd \QMODEM\SCRIPT
  89.  copy %1 Q-SETUP.CFG >nul
  90.  R:
  91.  cd \QMODEM
  92.  QMODEM.EXE /s=Q-SETUP.CMD
  93.  goto END
  94. :----------------------------------------------------------------------------
  95.  
  96. :RELAY
  97.  R:
  98.  cd \RELAY\NODEMIDI
  99.  if not exist IN.RLY goto RELAYEXPORT
  100.  echo Backing up IN.RLY files....
  101.  if exist IN.RLY copy IN.RLY IN.RL1 >nul
  102.  if exist IN.RLY del  IN.RLY
  103.  goto relayexport
  104.  
  105. :RELAYEXPORT
  106.  R:
  107.  cd \RELAY
  108.  if exist R:\RELAY\NODEMIDI\TRAVEL.RLY goto RELAYCALL
  109.  EXPORT.EXE
  110.  goto relaycall
  111.  
  112. :RELAYCALL
  113.  if exist R:\RELAY\NODEMIDI\%1.CAP del R:\RELAY\NODEMIDI\%1.CAP
  114.  R:
  115.  cd \QMODEM\SCRIPT
  116.  copy %1 Q-SETUP.CFG >nul
  117.  R:
  118.  cd \QMODEM
  119.  QMODEM.EXE /s=Q-SETUP.CMD
  120.  goto relayimport
  121.  
  122. :RELAYIMPORT
  123.  R:
  124.  cd \RELAY\NODEMIDI
  125.  if not exist IN.RLY goto end
  126.  copy IN.RLY IN.RL1 >nul
  127.  R:
  128.  cd \RELAY
  129.  IMPORT.EXE
  130.  goto end
  131.  
  132. :RNET
  133.  C:
  134.  cd \RNET
  135.  if not exist %1.qwk goto RNETEXPORT
  136.  echo Backing up %1.QWK files....
  137.  if exist %1.qwk copy %1.qwk %1.qw1 >nul
  138.  if exist %1.qwk del %1.qwk
  139.  goto rnetexport
  140.  
  141. :RNETEXPORT
  142.  rnet export %1
  143.  goto rnetcall
  144.  
  145. :RNETCALL
  146.  if exist c:\rnet\%1.cap del c:\rnet\%1.cap
  147.  R:
  148.  cd \QMODEM\SCRIPT
  149.  copy %1 Q-SETUP.CFG >nul
  150.  R:
  151.  cd \QMODEM
  152.  QMODEM.EXE /s=Q-SETUP.CMD
  153.  goto rnetimport
  154.  
  155. :RNETIMPORT
  156.  c:
  157.  cd \rnet
  158.  if not exist %1.qwk goto end
  159.  rnet import %1
  160.  goto end
  161.  
  162. :END
  163.  for %%A in (MAIL OPTION CALL IMPORT %1 %2) do set QNS%%A=
  164.  echo                  * * * QNS Routine Completed * * *
  165.