home *** CD-ROM | disk | FTP | other *** search
/ Stars of Shareware: DFÜ und Kommunikation / SOS-DFUE.ISO / programm / texte / mpguid21 / fdt_prot.bat < prev    next >
Encoding:
DOS Batch File  |  1993-10-26  |  10.4 KB  |  276 lines

  1. @echo off
  2. cls
  3.  
  4. echo ---------------------------------------------------------
  5. echo   FrontDoor Terminal Protocol Batch v2.1 - (C) UGR 1993
  6. echo ---------------------------------------------------------
  7.  
  8. rem --------------------------------------------------------------------------
  9. rem   Einbindung des FrontDoor/Terminal-Batches unter :     
  10. rem   -------------------------------------------------
  11. rem   fdsetup/Terminal/Miscellaneous/Editor als FDT_PROT.BAT
  12. rem --------------------------------------------------------------------------
  13.  
  14. rem --------------------------------------------------------------------------
  15. rem   Globale Settings :
  16. rem   ------------------
  17. rem   COMPORT = Verwendeter serieller Port
  18. rem   PROTDIR = Verzeichnis zu den Protokollen (mit Backslash!)
  19. rem   DOWNDIR = Verzeichnis fuer Downloads (mit Backslash!)
  20. rem   UPLODIR = Verzeichnis fuer Uploads (mit Backslash!)
  21. rem   DSZVERS = DSZ/GSZ registriert/unregistriert REG/UNREG
  22. rem   WAITVAL = Wartezeit falls ein Fehler auftrat
  23. rem   ESTBAUD = Die Geschwindigkeit des Modems - dies laesst sich leider
  24. rem             nicht aus FD entnehmen, daher einen Standard-Wert einstellen.
  25. rem             Da ja eh ein Fossil-Treiber aktiv ist spielt der Wert nur für
  26. rem             die Zeitberechnung eine Rolle.
  27. rem   LOKBAUD = Geschwindigkeit der geLOCKten Schnittstelle. Falls nicht
  28. rem             vorhanden gleich ESTBAUD setzen.
  29. rem --------------------------------------------------------------------------
  30.  
  31. set COMPORT=3
  32. set PROTDIR=c:\superbbs\pro\
  33. set DOWNDIR=c:\front\down\
  34. set UPLODIR=c:\front\up\
  35. set DSZVERS=REG
  36. set WAITVAL=5
  37. set ESTBAUD=2400
  38. set LOKBAUD=2400
  39.  
  40. rem ---------------------------------------------
  41. rem   War genug Environment-Speicher vorhanden ?
  42. rem ---------------------------------------------
  43.  
  44. if "%COMPORT%"=="" goto ENV_ERR
  45. if "%PROTDIR%"=="" goto ENV_ERR
  46. if "%DOWNDIR%"=="" goto ENV_ERR
  47. if "%UPLODIR%"=="" goto ENV_ERR
  48. if "%DSZVERS%"=="" goto ENV_ERR
  49. if "%WAITVAL%"=="" goto ENV_ERR
  50. if "%ESTBAUD%"=="" goto ENV_ERR
  51. if "%LOKBAUD%"=="" goto ENV_ERR
  52.  
  53. rem --------------------------------------------------------------------------
  54. rem   Parameter die beim Aufruf zu uebergeben sind :
  55. rem   ----------------------------------------------
  56. rem   Die uebergebenen Parameter waehlen das Protokoll aus und veranlassen
  57. rem   (falls vorhanden) den Upload mit dem/den angebenen Filenamen.
  58. rem
  59. rem   1. Parameter (Protokoll-Auswahl)
  60. rem
  61. rem   DSZ oder dsz   = DSZ                
  62. rem   MPT oder mpt   = MPT/Puma
  63. rem   JMD oder jmd   = JModem Download
  64. rem   JMU oder jmu   = JModem Upload
  65. rem   BIM oder bim   = BiModem
  66. rem   BIP oder bip   = BiModem Pro (Pampa)
  67. rem   HSL oder hsl   = HS/Link
  68. rem   SZM oder szm   = SZModem
  69. rem
  70. rem   2. Parameter und Folgende (optional) - Filename(n) fuer den Upload
  71. rem      Der Pfad zu den Uploads wird angefuegt, es sind nur die Dateinamen
  72. rem      zu übergeben.
  73. rem 
  74. rem   Z.B. :  1.txt 2.txt 3.txt
  75. rem           filename.ext
  76. rem           usw.
  77. rem --------------------------------------------------------------------------
  78.  
  79. rem --------------------------------------------------------------------------
  80. rem   Sprungmarken :
  81. rem   --------------
  82. rem   DSZ_DL             DSZ/GSZ Download
  83. rem   DSZ_UL             DSZ/GSZ Upload
  84. rem   MPT_DL             MPT/Puma Download
  85. rem   MPT_UL             MPT/Puma Upload
  86. rem   JMOD_DL            JModem Download
  87. rem   JMOD_UL            JModem Upload
  88. rem   BI_DL              BiModem Download
  89. rem   BI_UL              BiModem (zusätzlich) Upload
  90. rem   BIP_DL             BiModem Pro Download
  91. rem   BIP_UL             NiModem Pro (zusätzlich) Upload
  92. rem   HSL_DLUL           HS/Link Up- und Download
  93. rem   SZM_DL             SZModem Download
  94. rem   SZM_UL             SZModem Upload
  95. rem -------------------------------------------------------------------------- 
  96.      
  97. rem --------------------------
  98. rem   'Parsing' der Parameter
  99. rem --------------------------
  100.  
  101. del %PROTDIR%files.lst >NUL
  102. if not "%2"=="" goto PAR_UL                             rem Uploads ?
  103. goto 1_CH_1
  104.  
  105. :PAR_UL                                                 rem Files nach Liste
  106. echo %UPLODIR%%2>>%PROTDIR%files.lst
  107. if not "%3"=="" echo %UPLODIR%%3>>%PROTDIR%files.lst
  108. if not "%4"=="" echo %UPLODIR%%4>>%PROTDIR%files.lst
  109. if not "%5"=="" echo %UPLODIR%%5>>%PROTDIR%files.lst
  110. if not "%6"=="" echo %UPLODIR%%6>>%PROTDIR%files.lst
  111. if not "%7"=="" echo %UPLODIR%%7>>%PROTDIR%files.lst
  112. if not "%8"=="" echo %UPLODIR%%8>>%PROTDIR%files.lst
  113. if not "%9"=="" echo %UPLODIR%%9>>%PROTDIR%files.lst
  114. goto 1_CH_1
  115.      
  116. :1_CH_1                                                 rem  Abfrage 1/1
  117. if "%1"=="dsz" goto 1_CH_2                              rem  DSZ ?
  118. if "%1"=="DSZ" goto 1_CH_2                              rem  DSZ ?
  119. goto 2_CH_1                                             rem  false
  120.  
  121. :1_CH_2                                                 rem  Abfrage 1/2
  122. if not exist %PROTDIR%files.lst goto DSZ_DL             rem  Nur Download ?
  123. goto DSZ_UL                                             rem  Upload
  124.  
  125. :2_CH_1                                                 rem  Abfrage 2/1
  126. if "%1"=="mpt" goto 2_CH_2                              rem  MPT ?
  127. if "%1"=="MPT" goto 2_CH_2                              rem  MPT ?
  128. goto 3_CH_1                                             rem  false
  129.  
  130. :2_CH_2                                                 rem  Abfrage 2/2
  131. if not exist %PROTDIR%files.lst goto MPT_DL             rem  Nur Download ?
  132. goto MPT_UL                                             rem  Upload
  133.  
  134. :3_CH_1                                                 rem  Abfrage 3/1
  135. if "%1"=="jmd" goto JMOD_DL                             rem  JModem Download ?
  136. if "%1"=="JMD" goto JMOD_DL                             rem  JModem Download ?
  137. goto 4_CH_1                                             rem  false
  138.  
  139. :4_CH_1                                                 rem  Abfrage 4/1
  140. if "%1"=="jmu" goto JMOD_UL                             rem  JModem Upload ?
  141. if "%1"=="JMU" goto JMOD_UL                             rem  JModem Upload ?
  142. goto 5_CH_1                                             rem  false
  143.  
  144. :5_CH_1                                                 rem  Abfrage 5/1
  145. if "%1"=="bim" goto 5_CH_2                              rem  BiModem ?
  146. if "%1"=="BIM" goto 5_CH_2                              rem  BiModem ?
  147. goto 6_CH_1                                             rem  false
  148.  
  149. :5_CH_2                                                 rem  Abfrage 5/2
  150. if not exist %PROTDIR%files.lst goto BI_DL              rem  Nur Download ?
  151. goto BI_UL                                              rem  Upload
  152.  
  153. :6_CH_1                                                 rem  Abfrage 6/1
  154. if "%1"=="hsl" goto HSL_DLUL                            rem  HS/Link ?
  155. if "%1"=="HSL" goto HSL_DLUL                            rem  HS/Link ?
  156. goto 7_CH_1                                             rem  false
  157.  
  158. :7_CH_1                                                 rem  Abfrage 7/1
  159. if "%1"=="szm" goto 7_CH_2                              rem  SZModem ?
  160. if "%1"=="SZM" goto 7_CH_2                              rem  SZModem ?
  161. goto 8_CH_1                                             rem  false
  162.  
  163. :7_CH_2                                                 rem  Abfrage 7/2
  164. if not exist %PROTDIR%files.lst goto SZM_DL             rem  Download ?
  165. goto SZM_UL                                             rem  Upload
  166.  
  167. :8_CH_1                                                 rem  Abfrage 8/1
  168. if "%1"=="bip" goto 8_CH_2                              rem  BiModem Pro ?
  169. if "%1"=="BIP" goto 8_CH_2                              rem  BiModem Pro ?
  170. goto ENDE_F                                             rem  false
  171.  
  172. :8_CH_2
  173. if not exist %PROTDIR%files.lst goto BIP_DL             rem  Download ?
  174. goto BIP_UL                                             rem  Upload
  175.  
  176.  
  177. :DSZ_DL  
  178. if "%DSZVERS%"=="REG" goto DSZ_DLR
  179. echo -------------------------------------------------------------------
  180. echo DSZ ist unregistriert - Dateien werden im aktuellen Pfad empfangen!
  181. echo -------------------------------------------------------------------
  182. %PROTDIR%dsz.com pG0 port %COMPORT% rz
  183. goto END_BAT
  184. :DSZ_DLR
  185. %PROTDIR%dsz.com pG0 port %COMPORT% rz -Z -m %DOWNDIR%
  186. goto END_BAT
  187.  
  188. :DSZ_UL  
  189. %PROTDIR%dsz.com pG0 port %COMPORT% sz @%PROTDIR%files.lst
  190. goto END_BAT
  191.  
  192. :MPT_DL  
  193. %PROTDIR%mpt.exe P%COMPORT% E%ESTBAUD% R %DOWNDIR%
  194. goto END_BAT
  195.  
  196. :MPT_UL  
  197. %PROTDIR%mpt.exe P%COMPORT% E%ESTBAUD% S @%PROTDIR%files.lst
  198. goto END_BAT
  199.  
  200. :JMOD_DL 
  201. if "%2"=="" goto JMOD_F
  202. %PROTDIR%jmodem.exe R%COMPORT% %DOWNDIR%%2
  203. goto END_BAT
  204.  
  205. :JMOD_UL 
  206. if "%2"=="" goto JMOD_F
  207. %PROTDIR%jmodem.exe S%COMPORT% %UPLODIR%%2
  208. goto END_BAT
  209.  
  210. :BI_DL   
  211. %PROTDIR%bimodem.com /C %PROTDIR%bimodem.cfg /B %LOKBAUD% /L %COMPORT% /R %DOWNDIR%
  212. goto END_BAT
  213.  
  214. :BI_UL   
  215. %PROTDIR%bimodem.com /C %PROTDIR%bimodem.cfg /B %LOKBAUD% /L %COMPORT% /R %DOWNDIR% /U @%PROTDIR%files.lst
  216. goto END_BAT
  217.  
  218. :HSL_DLUL
  219. %PROTDIR%hslink.exe -! -K -HS -I2 -R -S4096 -E%ESTBAUD% -P%COMPORT% -U%DOWNDIR% @%PROTDIR%files.lst
  220. goto END_BAT
  221.  
  222. :SZM_DL  
  223. %PROTDIR%szmodem.exe port %COMPORT% speed %ESTBAUD% rz %DOWNDIR%
  224. goto END_BAT
  225.  
  226. :SZM_UL  
  227. %PROTDIR%szmodem.exe port %COMPORT% speed %ESTBAUD% sz @%PROTDIR%files.lst
  228. goto END_BAT
  229.  
  230. :BIP_DL   
  231. %PROTDIR%bimodem.com /B %LOKBAUD% /L %COMPORT% /R %DOWNDIR%
  232. goto END_BAT
  233.  
  234. :BIP_UL   
  235. %PROTDIR%bimodem.com /B %LOKBAUD% /L %COMPORT% /R %DOWNDIR% /U @%PROTDIR%files.lst
  236. goto END_BAT
  237.  
  238. :ENV_ERR
  239. cls
  240. echo --------------------------------------------------------
  241. echo Fehler: nicht genügend Environt-Speicher vorhanden!
  242. echo         Erhöhe /E:xxxx beim Shell-Aufruf von COMMAND.COM
  243. echo --------------------------------------------------------
  244. wait 5
  245. goto END_BAT
  246.  
  247. :JMOD_F
  248. cls
  249. echo ---------------------------------------------------
  250. echo Fehler: kein Filename für JModem-Betrieb angegeben!
  251. echo ---------------------------------------------------
  252. wait %WAITVAL%
  253. goto END_BAT
  254.  
  255. :ENDE_F
  256. cls
  257. echo ---------------------------------------------------------------
  258. echo Fehler: kein gültiger Parameter zur Protokollauswahl angegeben!
  259. echo ---------------------------------------------------------------
  260. wait %WAITVAL%
  261. goto END_BAT
  262.  
  263. :END_BAT
  264. set COMPORT=
  265. set PROTDIR=
  266. set DOWNDIR=
  267. set DSZVERS=
  268. set WAITVAL=
  269. set ESTBAUD=
  270. set LOKBAUD=
  271. cls
  272. echo ------------------------------------------------
  273. echo FrontDoor Terminal Protocol Batch v2.0 - beendet
  274. echo ------------------------------------------------
  275. exit
  276.