home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #1 / monster.zip / monster / BBS_UTIL / RBTCH242.ZIP / EXAMPLE.ZIP / EXAMPLES.ZIP / PHASE2C.1 < prev    next >
Text File  |  1992-05-31  |  11KB  |  201 lines

  1.   @echo off
  2.   IF not exist %1 GOTO EXIT
  3.   REM       %1 = path/filename.extension, %2 = extension
  4.   REM       %3 = node number, %4 = filename(no period or extension)
  5.   REM       %5 = the path to the upload directory (no trailing backslash)
  6.   REM
  7.   REM       Note that gate%node% is used here.  If you do not use
  8.   REM       GATEWAY substitue you COM port here instead ( > COM1 )
  9.   REM
  10.   REM       %node% is from the SET NODE=1, SET NODE=2, etc. in your
  11.   REM       Autoexec.Bat or your batch file that runs your DV
  12.   REM       Node Window
  13.   REM
  14.   md d:\new\%3
  15.   if %2 == LZH GOTO LZH
  16.   IF %2 == ZOO GOTO ZOO
  17.   IF %2 == PAK GOTO PAK
  18.   IF %2 == ARC GOTO ARC
  19.   IF %2 == EXE GOTO EXE
  20.   IF %2 == COM GOTO COM
  21.   IF %2 == ARJ GOTO ARJ
  22.   IF %2 == ZIP GOTO ZIP
  23.   GOTO :EXIT
  24. :ZIP
  25. echo.                                                                 > gate%node%
  26. echo                                                              > gate%node%
  27. echo.                                                                 > gate%node%
  28. echo       ╔════════════════════════════════════════════════════════╗ > gate%node%
  29. echo       ║     Preparing Uploaded File for Date & Virus Check     ║ > gate%node%
  30. echo       ╚════════════════════════════════════════════════════════╝ > gate%node%
  31. echo.                                                                 > gate%node%
  32.   pkunzip -o %1 d:\new\%3 > NUL
  33. echo       ╔════════════════════════════════════════════════════════╗ > gate%node%
  34. echo       ║          Checking to see how old the file(s)           ║ > gate%node%
  35. echo       ║             are in the file you Uploaded               ║ > gate%node%
  36. echo       ╚════════════════════════════════════════════════════════╝ > gate%node%
  37. echo.                                                                 > gate%node%
  38.   testfile 1989 50 d:\new\%3
  39.   IF ERRORLEVEL 1 GOTO OLDDATES
  40. echo.                                                                 > gate%node%
  41. echo       ╔════════════════════════════════════════════════════════╗ > gate%node%
  42. echo       ║            Checking Uploaded File for Virus            ║ > gate%node%
  43. echo       ╚════════════════════════════════════════════════════════╝ > gate%node%
  44. echo.                                                                 > gate%node%
  45.   scan/a d:\new\%3 /NOMEM > NUL
  46.   IF ERRORLEVEL 1 GOTO VIRUS
  47. echo.                                                                 > gate%node%
  48. echo       ╔════════════════════════════════════════════════════════╗ > gate%node%
  49. echo       ║            Adding THE SHORELINE Logo to File           ║ > gate%node%
  50. echo       ╚════════════════════════════════════════════════════════╝ > gate%node%
  51. echo.                                                                 > gate%node%
  52.   ZIPLOGO D:\NEW\%4.%2 C:\LOGO\MYLOGO.DOC > NUL
  53.   IF %2 == ZIP GOTO EXIT
  54. :PKZIP
  55. echo       ╔════════════════════════════════════════════════════════╗ > gate%node%
  56. echo       ║         Checking to see how old the file(s)            ║ > gate%node%
  57. echo       ║            are in the file you Uploaded                ║ > gate%node%
  58. echo       ╚════════════════════════════════════════════════════════╝ > gate%node%
  59. echo.                                                                 > gate%node%
  60.   testfile 1989 50 d:\new\%3
  61.   IF ERRORLEVEL 1 GOTO OLDDATES
  62. echo.                                                                 > gate%node%
  63. echo       ╔════════════════════════════════════════════════════════╗ > gate%node%
  64. echo       ║            Checking Uploaded File for Virus            ║ > gate%node%
  65. echo       ╚════════════════════════════════════════════════════════╝ > gate%node%
  66. echo.                                                                 > gate%node%
  67.   scan/a d:\new\%3 /NOMEM > NUL
  68.   IF ERRORLEVEL 1 GOTO VIRUS
  69.   IF %2 == ARJ ARJLOGO %1 C:\LOGO\MYLOGO.DOC > NUL
  70.   IF %2 == ZIP ZIPLOGO %1 C:\LOGO\MYLOGO.DOC > NUL
  71. REM - If we want to convert the upload to ZIP, then this is the place
  72. REM - to ZIP the file in the node directory which is off the upload
  73. REM - directory.  (D:\NEW\%3)
  74.   GOTO EXIT
  75. :ZOO
  76.   D:
  77.   CD\new\%3
  78. echo.                                                                 > gate%node%
  79. echo       ╔════════════════════════════════════════════════════════╗ > gate%node%
  80. echo       ║     Preparing Uploaded File for Date & Virus Check     ║ > gate%node%
  81. echo       ╚════════════════════════════════════════════════════════╝ > gate%node%
  82. echo.                                                                 > gate%node%
  83.   looz x %1 > NUL
  84.   c:
  85.   cd\rbbs
  86.   GOTO PKZIP
  87. :ARJ
  88.   D:
  89.   CD\new\%3
  90. echo.                                                                 > gate%node%
  91. echo       ╔════════════════════════════════════════════════════════╗ > gate%node%
  92. echo       ║     Preparing Uploaded File for Date & Virus Check     ║ > gate%node%
  93. echo       ╚════════════════════════════════════════════════════════╝ > gate%node%
  94. echo.                                                                 > gate%node%
  95.   arj x %1 > NUL
  96.   c:
  97.   cd\rbbs
  98.   GOTO PKZIP
  99. :LZH
  100. echo.                                                                 > gate%node%
  101. echo       ╔════════════════════════════════════════════════════════╗ > gate%node%
  102. echo       ║     Preparing Uploaded File for Date & Virus Check     ║ > gate%node%
  103. echo       ╚════════════════════════════════════════════════════════╝ > gate%node%
  104. echo.                                                                 > gate%node%
  105.   d:
  106.   cd\new\%3
  107.   lha e %1 > NUL
  108.   c:
  109.   cd\rbbs
  110.   GOTO PKZIP
  111. :PAK
  112.   D:
  113.   CD\new\%3
  114. echo.                                                                 > gate%node%
  115. echo       ╔════════════════════════════════════════════════════════╗ > gate%node%
  116. echo       ║     Preparing Uploaded File for Date & Virus Check     ║ > gate%node%
  117. echo       ╚════════════════════════════════════════════════════════╝ > gate%node%
  118. echo.                                                                 > gate%node%
  119.   pak E %1 > NUL
  120.   C:
  121.   cd\rbbs
  122.   GOTO PKZIP
  123. :ARC
  124.   D:
  125.   CD d:\new\%3
  126. echo.                                                                 > gate%node%
  127. echo       ╔════════════════════════════════════════════════════════╗ > gate%node%
  128. echo       ║     Preparing Uploaded File for Date & Virus Check     ║ > gate%node%
  129. echo       ╚════════════════════════════════════════════════════════╝ > gate%node%
  130. echo.                                                                 > gate%node%
  131.   pkunpak -E %1 > NUL
  132.   C:
  133.   GOTO PKZIP
  134. :EXE
  135. echo.                                                                 > gate%node%
  136. echo       ╔════════════════════════════════════════════════════════╗ > gate%node%
  137. echo       ║            Checking Uploaded File for Virus            ║ > gate%node%
  138. echo       ╚════════════════════════════════════════════════════════╝ > gate%node%
  139. echo.                                                                 > gate%node%
  140.   scan/a %1 /NOMEM > NUL
  141.   IF ERRORLEVEL 1 GOTO VIRUS
  142.   GOTO EXIT
  143. :COM
  144. echo.                                                                 > gate%node%
  145. echo       ╔════════════════════════════════════════════════════════╗ > gate%node%
  146. echo       ║            Checking Uploaded File for Virus            ║ > gate%node%
  147. echo       ╚════════════════════════════════════════════════════════╝ > gate%node%
  148. echo.                                                                 > gate%node%
  149.   scan/a %1 /NOMEM > NUL
  150.   IF ERRORLEVEL 1 GOTO VIRUS
  151.   GOTO EXIT
  152. :DELFILE
  153. echo.                                                                 > gate%node%
  154. echo       ╔════════════════════════════════════════════════════════╗ > gate%node%
  155. echo       ║     File has Failed Check and has been Deleted         ║ > gate%node%
  156. echo       ╚════════════════════════════════════════════════════════╝ > gate%node%
  157. echo.                                                                 > gate%node%
  158.   del %1 > NUL
  159.   GOTO EXIT
  160. :OLDDATES
  161.   DEL %1 > NUL
  162. cls                                                                   > gate%node%
  163. echo.                                                                 > gate%node%
  164. echo                     The File : %4.%2                             > gate%node%
  165. echo.                                                                 > gate%node%
  166. echo       ╔════════════════════════════════════════════════════════╗ > gate%node%
  167. echo       ║          Dates of the files from the Upload            ║ > gate%node%
  168. echo       ║              are older than rules allow                ║ > gate%node%
  169. echo       ║                                                        ║ > gate%node%
  170. echo       ║             THIS UPLOADED HAS BEEN DELETED             ║ > gate%node%
  171. echo       ║        ******************************************      ║ > gate%node%
  172. echo       ╚════════════════════════════════════════════════════════╝ > gate%node%
  173. echo.                                                                 > gate%node%
  174. GOTO EXIT
  175. :VIRUS
  176.   DEL %1 > NUL
  177. cls                                                                   > gate%node%
  178. echo.                                                                 > gate%node%
  179. echo.                                                                 > gate%node%
  180. echo.                                                                 > gate%node%
  181. echo.                                                                 > gate%node%
  182. echo.                                                                 > gate%node%
  183. echo                     The File : %4.%2                             > gate%node%
  184. echo.                                                                 > gate%node%
  185. echo       ╔════════════════════════════════════════════════════════╗ > gate%node%
  186. echo       ║        ******************************************      ║ > gate%node%
  187. echo       ║          Possible VIRUS Detected....This Upload        ║ > gate%node%
  188. echo       ║                  has been -DELETED-                    ║ > gate%node%
  189. echo       ║                                                        ║ > gate%node%
  190. echo       ║                                                        ║ > gate%node%
  191. echo       ║          It is also recommended that you delete        ║ > gate%node%
  192. echo       ║        this file from your system as a precaution      ║ > gate%node%
  193. echo       ║        ******************************************      ║ > gate%node%
  194. echo       ╚════════════════════════════════════════════════════════╝ > gate%node%
  195. echo.                                                                 > gate%node%
  196. :EXIT
  197.   c:
  198.   cd\rbbs
  199.   kill d:\new\%3 /unsafe /bios
  200.   seterror 0
  201.