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

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