home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #1 / monster.zip / monster / RA / UPCHK501.ZIP / ADVANCED.BAT next >
DOS Batch File  |  1994-05-01  |  2KB  |  78 lines

  1. @ECHO OFF
  2.  
  3. rem !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  4. rem !!  This is the advanced batch file that will include inserting       !!  
  5. rem !!  comments into any of the support archive types (if keep original  !!
  6. rem !!  name is turned on)                                                !!   
  7. rem !!                                                                    !!
  8. rem !!  UpUtils /R will return an errorlevel depending on archive type    !!
  9. rem !!   1=ARC  2=ARJ  3=LHA  4=LZH  5=PAK  6=ZIP  7=ZOO  8=SQZ  9=UC2    !! 
  10. rem !!  13=EXE 14=GIF 15=JPG 16=???                                       !!
  11. rem !!                                                                    !!
  12. rem !!  UpUtils /E will return the errorlevel specified                   !!
  13. rem !!                                                                    !!
  14. rem !!  Remember that you must pass this file two parameters, the first   !!
  15. rem !!  being the dropfile (ie DOOR.SYS) and the second being the archive !!
  16. rem !!                                                                    !!
  17. rem !!  Example for RA: *C /C C:\RA\UPCHECK\ADVANCED.BAT C:\RA\DOOR.SYS @ !!
  18. rem !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  19.  
  20. rem *** Change to the UpCheck directory
  21. CD \RA\DOORS\UPCHECK
  22.  
  23. rem *** Run UpCheck, passing drop file and archive file
  24. UPCHECK %1 %2
  25.  
  26. rem *** Was there an error?
  27. IF ERRORLEVEL 1 GOTO :FAIL
  28.  
  29. :PASS
  30. UPUTILS /REPORT %2
  31. IF ERRORLEVEL 8 GOTO :PASSSQZ
  32. IF ERRORLEVEL 6 GOTO :PASSZIP
  33. IF ERRORLEVEL 2 GOTO :PASSARJ
  34. GOTO :PASSEND
  35.  
  36. :PASSSQZ
  37. SQZ c %2 C:\BBS\COMMENT.TXT
  38. GOTO :PASSEND
  39.  
  40. :PASSZIP
  41. PKZIP %2 -z < C:\BBS\COMMENT.TXT
  42. GOTO :PASSEND
  43.  
  44. :PASSARJ
  45. ARJ c %2 -zC:\BBS\COMMENT.TXT      
  46. GOTO :PASSEND
  47.  
  48. :FAIL
  49. UPUTILS /REPORT %2
  50. IF ERRORLEVEL 8 GOTO :FAILSQZ
  51. IF ERRORLEVEL 6 GOTO :FAILZIP
  52. IF ERRORLEVEL 2 GOTO :FAILARJ
  53. GOTO :FAILEND
  54.  
  55. :FAILSQZ
  56. SQZ c %2 C:\BBS\COMMENT.TXT
  57. GOTO :FAILEND
  58.  
  59. :FAILZIP
  60. PKZIP %2 -z < C:\BBS\COMMENT.TXT
  61. GOTO :FAILEND
  62.  
  63. :FAILARJ
  64. ARJ c %2 -zC:\BBS\COMMENT.TXT
  65. GOTO :FAILEND
  66.  
  67. :FAILEND
  68. rem *** Return a Non-Zero to tell the BBS the file failed
  69. UPUTILS /ERRORLEVEL 1
  70. GOTO :END
  71.  
  72. :PASSEND
  73. rem *** Return a Zero to tell the BBS the file passed
  74. UPUTILS /ERRORLEVEL 0
  75. GOTO :END
  76.  
  77. :END
  78.