home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #1 / monster.zip / monster / BBS_UTIL / RBTCH242.ZIP / EXAMPLE.ZIP / EXAMPLES.ZIP / PHASE1.2 < prev    next >
Text File  |  1992-11-13  |  8KB  |  183 lines

  1. @echo off
  2.   REM       %1 = path/filename.extension
  3.   REM       %2 = extension
  4.   REM       %3 = node number
  5.   REM       %4 = filename(no period or extension)
  6.   REM       %5 = Upload directory
  7. if %2 == ARJ GOTO :ARJ1
  8. if %2 == ZIP GOTO :ZIP1
  9. if %2 == GIF GOTO :GIF1
  10. GOTO :PART2
  11. :ZIP1
  12. if not exist %1 GOTO :PART2
  13. echo                    Checking ZIP Integrity of Upload              > gate%node%
  14. pkunzip -t %1 > NUL
  15. if errorlevel 1 GOTO :DEL1
  16. GOTO :PART2
  17. :ARJ1
  18. if not exist %1 GOTO :PART2
  19. echo                    Checking ARJ Integrity of Upload              > gate%node%
  20. arj t %1 > NUL
  21. if errorlevel 1 GOTO :DEL1
  22. GOTO :PART2
  23. :DEL1
  24. del %1 > NUL
  25. GOTO :EXIT
  26. :GIF1
  27. echo.                                                                 > gate%node%
  28. echo                                ****                              > gate%node%
  29. echo                  The Policies of this BBS state that             > gate%node%
  30. echo                      GIF's are UNWANTED FILES!                   > gate%node%
  31. echo              THE UPLOADED .GIF FILE HAS BEEN DELETED!!!!!        > gate%node%
  32. echo                                ****                              > gate%node%
  33. echo                    You agreed to these Policies when             > gate%node%
  34. echo                      you first logged onto this BBS              > gate%node%
  35. echo                            as a New User                         > gate%node%
  36. echo.                                                                 > gate%node%
  37. GOTO :EXIT
  38. :PART2
  39.   IF not exist %1 GOTO EXIT
  40.   REM       %1 = path/filename.extension, %2 = extension
  41.   REM       %3 = node number, %4 = filename(no period or extension)
  42.   REM       D:\NEW is the upload directory on the BBS in this example
  43.   REM       change this to match your system
  44.   md g:\upwork\%3
  45.   if %2 == LZH GOTO LZH
  46.   IF %2 == ZOO GOTO ZOO
  47.   IF %2 == PAK GOTO PAK
  48.   IF %2 == ARC GOTO ARC
  49.   IF %2 == EXE GOTO EXE
  50.   IF %2 == COM GOTO COM
  51.   IF %2 == ARJ GOTO ARJ
  52.   IF %2 == ZIP GOTO ZIP
  53.   GOTO :EXIT
  54. :ZIP
  55. echo.                                                                   > gate%node%
  56. echo            Preparing Uploaded File for Date & Virus Check          > gate%node%
  57.   pkunzip -o %1 g:\upwork\%3 > NUL
  58. echo.                                                                   > gate%node%
  59. echo                 Checking to see how old the file(s)                > gate%node%
  60. echo                    are in the file you Uploaded.                   > gate%node%
  61. echo.                                                                   > gate%node%
  62.   testfile 1989 50 g:\upwork\%3
  63.   IF ERRORLEVEL 1 GOTO OLDDATE
  64. echo.                                                                   > gate%node%
  65. echo                  Checking Uploaded File for Virus                  > gate%node%
  66. echo.                                                                   > gate%node%
  67.   scan/a g:\upwork\%3 /NOMEM > NUL
  68.   IF ERRORLEVEL 1 GOTO VIRUS
  69. echo.                                                                   > gate%node%
  70. echo                  Adding THE SHORELINE Logo to File                 > gate%node%
  71. echo.                                                                   > gate%node%
  72.   ZIPLOGO %1 C:\LOGO\MYLOGO.DOC > NUL
  73.   IF %2 == ZIP GOTO EXIT
  74. :PKZIP
  75. echo.                                                                   > gate%node%
  76. echo                 Checking to see how old the file(s)                > gate%node%
  77. echo                    are in the file you Uploaded.                   > gate%node%
  78. echo.                                                                   > gate%node%
  79.   testfile 1989 50 g:\upwork\%3
  80.   IF ERRORLEVEL 1 GOTO OLDDATE
  81. echo.                                                                   > gate%node%
  82. echo                  Checking Uploaded File for Virus                  > gate%node%
  83. echo.                                                                   > gate%node%
  84.   scan g:\upwork\%3 /NOMEM /A /NOBREAK /NOPAUSE > NUL
  85.   IF ERRORLEVEL 1 GOTO VIRUS
  86.   IF %2 == ARJ ARJLOGO %1 C:\LOGO\MYLOGO.DOC > NUL
  87.   IF %2 == ZIP ZIPLOGO %1 C:\LOGO\MYLOGO.DOC > NUL
  88. REM - If we want to convert the upload to ZIP, the this is the place
  89. REM - to ZIP the file in the node directory which is off the upload
  90. REM - directory.  (g:\upwork\%3)
  91.   GOTO EXIT
  92. :ZOO
  93.   g:
  94.   CD\upwork\%3
  95. echo.                                                                   > gate%node%
  96. echo            Preparing Uploaded File for Date & Virus Check          > gate%node%
  97. echo.                                                                   > gate%node%
  98.   looz x %1 > NUL
  99.   c:
  100.   cd\rbbs
  101.   GOTO PKZIP
  102. :ARJ
  103.   g:
  104.   CD\upwork\%3
  105. echo.                                                                   > gate%node%
  106. echo            Preparing Uploaded File for Date & Virus Check          > gate%node%
  107. echo.                                                                   > gate%node%
  108.   ARJ x %1 > NUL
  109.   c:
  110.   cd\rbbs
  111.   GOTO PKZIP
  112. :LZH
  113. echo.                                                                   > gate%node%
  114. echo            Preparing Uploaded File for Date & Virus Check          > gate%node%
  115. echo.                                                                   > gate%node%
  116.   g:
  117.   cd\upwork\%3
  118.   lha e %1 > NUL
  119.   c:
  120.   cd\rbbs
  121.   GOTO PKZIP
  122. :PAK
  123.   g:
  124.   CD\upwork\%3
  125. echo.                                                                   > gate%node%
  126. echo            Preparing Uploaded File for Date & Virus Check          > gate%node%
  127. echo.                                                                   > gate%node%
  128.   pak E %1 > NUL
  129.   C:
  130.   cd\rbbs
  131.   GOTO PKZIP
  132. :ARC
  133.   g:
  134.   CD g:\upwork\%3
  135. echo.                                                                   > gate%node%
  136. echo            Preparing Uploaded File for Date & Virus Check          > gate%node%
  137. echo.                                                                   > gate%node%
  138.   pkunpak -E %1 > NUL
  139.   C:
  140.   GOTO PKZIP
  141. :EXE
  142. echo.                                                                   > gate%node%
  143. echo                  Checking Uploaded File for Virus                  > gate%node%
  144. echo.                                                                   > gate%node%
  145.   scan/a %1 /NOMEM > NUL
  146.   IF ERRORLEVEL 1 GOTO VIRUS
  147.   GOTO EXIT
  148. :COM
  149. echo.                                                                   > gate%node%
  150. echo                  Checking Uploaded File for Virus                  > gate%node%
  151. echo.                                                                   > gate%node%
  152.   scan/a %1 /NOMEM > NUL
  153.   IF ERRORLEVEL 1 GOTO VIRUS
  154.   GOTO EXIT
  155. :OLDDATE
  156. cls
  157. echo.                                                                   > gate%node%
  158. echo             The Dates of the files inside your Upload              > gate%node%
  159. echo.          are older than the rules allow.  File Deleted            > gate%node%
  160. echo.                                                                   > gate%node%
  161.   del %1 > NUL
  162.   GOTO EXIT
  163. :VIRUS
  164.   DEL %1 > NUL
  165. cls
  166. echo.                                                                   > gate%node%
  167. echo                     The File : %4.%2                               > gate%node%
  168. echo.                                                                   > gate%node%
  169. echo               ******************************************           > gate%node%
  170. echo                 Possible VIRUS Detected....This Upload             > gate%node%
  171. echo                         has been -DELETED-                         > gate%node%
  172. echo                                                                    > gate%node%
  173. echo                                                                    > gate%node%
  174. echo                 It is also recommended that you delete             > gate%node%
  175. echo               this file from your system as a precaution           > gate%node%
  176. echo               ******************************************           > gate%node%
  177. echo.                                                                   > gate%node%
  178. :EXIT
  179.   c:
  180.   cd\rbbs
  181.   kill g:\upwork\%3 /unsafe /bios > NUL
  182.   seterror 0
  183.