home *** CD-ROM | disk | FTP | other *** search
/ Wacky Windows Stuff... / WACKY.iso / toolbook / prout1.bat < prev    next >
DOS Batch File  |  1992-05-11  |  4KB  |  114 lines

  1. @echo off
  2. rem -- process a single upload file - for ProDOOR 3.44 dated 12/31/91
  3. rem -- %1-logfile, %2-testfile,  %3 -comport, %4-conference
  4. rem -- determing file type and branch to proper test case
  5. rem -- using 4DOS commands
  6.  
  7. proecho %3 ~Testing:%@NAME[%2] -- to get upload credit, please wait~
  8.  
  9. if %@ext[%2] == zip goto ZIP
  10. if %@ext[%2] == ARJ goto ARCVTEST
  11. if %@ext[%2] == GIF goto GIF
  12. if %@ext[%2] == lzh goto ARCVTEST
  13. if %@ext[%2] == pak goto ARCVTEST
  14. if %@ext[%2] == arc goto ARCVTEST
  15. if %@ext[%2] == zoo goto ARCVTEST
  16. IF %2 == Z:\E\PLAY1\VERIFY.ULP GOTO VALIDATE
  17.  
  18. rem -- Catch wrong file types from bidirectional uploads
  19. proecho %3 Files not in one of the standard file formats: %@ext[%2]~
  20. proecho %3 Moving offline for sysop revue...~Leave note with description to get upload credit!~~
  21. move %2 r:\hold
  22. goto end
  23.  
  24. rem -- Check GIF, delete if invalid or incomplete GIF file and
  25. rem -- add resolution to description
  26. :GIF
  27.     giftest %2 /E/A/P:1/L/D/B:3/F:Z:\C\BBS\$DOOR.NAM %2
  28.     copy z:\c\bbs\$door.nam z:\c\$door.GIF
  29.     goto end
  30.  
  31. rem -- give caller info about proposed upload
  32. :VALIDATE
  33.      p:\ulp\ULPTEST -cp:\ulp\ULP.CFG -i4 -a3F8 -mupload -pp:\bbs\ -fZ:\E\PLAY1\VERIFY.ULP >>p:\bbs\$door.res
  34.      DEL Z:\E\PLAY1\VERIFY.ULP
  35.      goto end
  36.  
  37. rem -- remove/save/replace any header to look at later
  38. :ZIP
  39.      recom -o -lr:\comment.lst -sP:\bin\ziphdr. %2
  40.  
  41. rem -- test any of the standard archive formats for validity, age, dups
  42. rem -- update description from .DIZ .SDI files where possible
  43.  
  44. :ARCVTEST
  45.      addbidir Z:\C\bbs\$DOOR.NAM %2
  46.      p:\bin\prodiz %2 Z:\C\bbs\$door.nam
  47.      p:\ulp\ULPTEST -cp:\ulp\ULP.CFG -i4 -a3F8 -mupload -pp:\bbs\ -f%2
  48.  
  49. rem %? used instead of errorlevel for IFF constructs benefit
  50. rem PROECHO returns an errorlevel too--after executing it's cleared ULPTEST's value~
  51.  
  52. IFF %? GT 99 THEN
  53.     echo ULPTEST Error: %? >>r:\ULP.ERR
  54.     REM Mv2Call moves a comment/file into my CALLER1 file and deletes file
  55.     echo         ULP configuration error: %? >foo
  56.     Mv2Call Foo CALLER1
  57.     goto End
  58. ENDIFF
  59.  
  60. IFF %? == 9 THEN
  61.     ren %2 r:\hold\*.bad
  62.     proecho %3 ~%@NAME[%2] -- UPLOAD DENIED -- Archive contained defective GIF~
  63.     echo %@NAME[%2] -- UPLOAD DENIED -- Archive contained defective GIF>foo
  64.     mv2call foo p:\bbs\gen\caller1
  65.     GOTO End
  66. ENDIFF
  67.  
  68. IFF %? == 7 THEN
  69.     ren %2 r:\hold\*.old
  70.     proecho %3 ~%@NAME[%2] -- UPLOAD DENIED -- File age exceeded 18 months~
  71.     echo %@NAME[%2] -- UPLOAD DENIED -- File age exceeded 18 months>foo
  72.     mv2call foo p:\bbs\gen\caller1
  73.     GOTO End
  74. ENDIFF
  75.  
  76. IFF %? == 5 THEN
  77.     ren %2 r:\hold\*.dup
  78.     proecho %3 ~%@NAME[%2] -- UPLOAD DENIED -- Duplicate Percentage
  79.     echo %@NAME[%2] -- UPLOAD DENIED -- Duplicate Percentage>foo
  80.     mv2call foo p:\bbs\gen\caller1
  81.     GOTO End
  82. ENDIFF
  83.  
  84. IFF %? == 4 THEN
  85.     ren %2 r:\hold\*.vrs
  86.     proecho %3 ~%@NAME[%2] -- UPLOAD DENIED -- VIRUS FOUND!!!!!!!!!~
  87.     echo %@NAME[%2] -- UPLOAD DENIED -- VIRUS FOUND!!!!!!!!!
  88.     mv2call foo p:\bbs\gen\caller1
  89.     GOTO End
  90. ENDIFF
  91.  
  92. IFF %? == 3 THEN
  93.     ren %2 r:\hold\*.bad
  94.     proecho %3 ~%@NAME[%2] -- UPLOAD DENIED -- Failed archive testing~
  95.     mv2call foo p:\bbs\gen\caller1
  96.     GOTO End
  97. ENDIFF
  98.  
  99. IFF %? == 2 THEN
  100.     ren %2 r:\hold\*.DOS
  101.     proecho %3 ~%@NAME[%2] -- UPLOAD DENIED -- DOS Keyword part of archive names~
  102.     echo %@NAME[%2] -- UPLOAD DENIED -- DOS Keyword part of archive names>foo
  103.     mv2call foo p:\bbs\gen\caller1
  104.     GOTO End
  105. ENDIFF
  106.  
  107. IFF %? == 0 THEN
  108.     proecho %3 ~%@NAME[%2] -- Testing was sucessful in all respects!~
  109. ELSE
  110.     BEEP
  111. ENDIFF
  112.  
  113. :end
  114.