home *** CD-ROM | disk | FTP | other *** search
/ ftp.wwiv.com / ftp.wwiv.com.zip / ftp.wwiv.com / pub / BBS / ZIPLAB9.ZIP / GIFTST30.ZIP / PROUT1.BAT < prev    next >
DOS Batch File  |  1991-05-10  |  2KB  |  82 lines

  1. @echo off
  2. rem -- process a single upload file - for ProDOOR 3.4
  3. rem -- %1-logfile, %2-testfile, %3-comport, %4-conference number
  4.  
  5. rem -- determing file type and branch to proper test case
  6. testfile %2 arc zip pak lzh zoo gif
  7. if errorlevel == 98 goto end
  8. if errorlevel == 6 goto gif
  9. if errorlevel == 5 goto zoo
  10. if errorlevel == 4 goto lzh
  11. if errorlevel == 3 goto pak
  12. if errorlevel == 2 goto zip
  13. if errorlevel == 1 goto arc
  14. goto end
  15.  
  16. rem -- Check GIF, trim off extra bytes if found, delete if invalid or
  17. rem -- incomplete GIF file.  Insert resolution into ProDoor description.
  18. rem -- Redirect output to comport (will not showup on local screen).
  19. :gif
  20. proecho %3 ~~Checking GIF file...~
  21. giftest %2 /T /E > %3
  22. goto end
  23.  
  24. rem -- test ARC files -- first convert them to ZIP files
  25. :arc
  26. proecho %3 ~~Converting ARC file %2 to ZIP format.  Please wait...~
  27. chkpath tozip %0 >>%1
  28. if errorlevel 1 goto end
  29. tozip %2 >>%1
  30.  
  31. rem -- dsz's $door.log is no longer valid after conversion, delete it.
  32. if exist %DSZLOG% del %DSZLOG%
  33. goto zip
  34.  
  35.  
  36. rem -- test ZIP files
  37. :zip
  38. ptest %2
  39. proecho %3 ~~ChkAv 2.2 - Courtesy of The Bard's Lair (718) 381-3651~
  40. proecho %3 ~Checking for -AV~
  41. chkav %2
  42. if errorlevel == 2 av
  43. goto end
  44.  
  45. rem -- Found AV
  46. :av
  47. proecho %3 ~~Found -AV in file, sending mail to SysOp to revue file... ~
  48. echo User has uploaded the file: > mail
  49. echo %2 >> mail
  50. echo which contains an -AV in it, please revue file. >> mail
  51. txt2msg f:\pro\main\msgs -tSYSOP -fPROUTEST -sAV_File mail
  52. del mail
  53. goto end
  54.  
  55. rem -- test ZOO files
  56. :zoo
  57. chkpath zoo %0 >>%1
  58. if errorlevel 1 goto end
  59. zoo -test >>%1 %2
  60. if errorlevel 1 echo %2 has errors! >>%1
  61. goto end
  62.  
  63. rem -- test LZH files
  64. :lzh
  65. chkpath lharc %0 >>%1
  66. if errorlevel 1 goto end
  67. rem lharc 1.12 or later required for test function to work
  68. lharc t /v >>%1 %2
  69. if errorlevel 1 echo %2 has errors! >>%1
  70. goto end
  71.  
  72. rem -- test PAK files
  73. :pak
  74. chkpath pak %0 >>%1
  75. if errorlevel 1 goto end
  76. pak t >>%1 %2
  77. if errorlevel 1 echo %2 has errors! >>%1
  78. goto end
  79.  
  80.  
  81. :end
  82.