home *** CD-ROM | disk | FTP | other *** search
/ Chip 1999 Extra / Chip_Extra_1999.iso / share / aktuell / mimarzip / m8vcs99.exe / MimarSinan ACE Wrapper (ACE) / ace12b / REACE / REACE.BAT < prev    next >
Encoding:
DOS Batch File  |  1998-05-24  |  3.0 KB  |  87 lines

  1. @ECHO OFF
  2. CLS
  3. ECHO.
  4. ECHO ------------------------------------------------------------------------
  5. ECHO REACE.BAT                                       (C) Juergen Peters, 1998
  6. ECHO ------------------------------------------------------------------------
  7. ECHO Version 0.12a                                                 05-10-1998
  8. ECHO ------------------------------------------------------------------------
  9. ECHO.
  10. ::  Batchfile to convert any given archive into the ACE format (or any other)
  11. ::  using UU.EXE ("Universal Unpacker").
  12. ::  TDIR.EXE, UU.EXE and ACE.EXE must be located in DOS's PATH or being
  13. ::  completed by the full pathname to make this batch work.
  14. ::---------------------------------------------------------------------------
  15. ::
  16. :: Little syntax help if no parameter given or archive not found.
  17. IF EXIST %1 GOTO Unpack
  18. ECHO   Syntax:  REACE ARCHIV.EXT [further parameters for UU; optional]
  19. ECHO.
  20. GOTO End2
  21. ::
  22. :Unpack
  23. :: Store archive name and path in environment.
  24. SET ANAME=%1
  25. ::
  26. :: TDir creates a temporary directory and changes into it. It analyses
  27. :: the filename and sets the environment variables TDIR, ADIR and AEXT.
  28. :: If an error occurs it outputs a message and stops.
  29. TDIR.EXE C:\TEMP
  30. IF ERRORLEVEL 1 GOTO End2
  31. IF %AEXT%!==.EXE! SET SFX=-sfx
  32. ::
  33. :: Early detection of unknown or already ACE file as errortrap for REACEALL *.*
  34. :: If another packer than ACE.EXE is used, please change the corresponding
  35. :: errorlevel 90 (90+1) to the one of the other format, eg. 15 (15+1) for RAR.
  36. UU.EXE %ANAME%%AEXT% /I>NUL
  37. IF ERRORLEVEL 90 IF NOT ERRORLEVEL 91 GOTO End1
  38. IF ERRORLEVEL  0 IF NOT ERRORLEVEL  1 GOTO End1
  39. ::
  40. :: Unpack the source archive with UU.EXE. Please adjust parameters to
  41. :: reflect your own needs (eg. when using /D the source archive is deleted
  42. :: after extraction).
  43. UU.EXE %ANAME%%AEXT% .\ /R /X %2 %3 %4 %5 %6 %7 %8 %9
  44. IF ERRORLEVEL   1 GOTO End1
  45. ::
  46. :: Or packing into another format, eg. RAR or ARJ (the errorlevel in the
  47. :: above line UU.EXE .. /I has to be changed correspondingly!):
  48. ::
  49. :: RAR.EXE m %SFX -r -s -m5 -y -c- %ANAME
  50. ::
  51. :: With ARJ.EXE also line SET SFX= has to be changed: ... SET SFX=-je (or -je1).
  52. :: ARJ.EXE m %SFX -r -jm -jyyco %ANAME
  53. ::
  54. :: Optionally call virus scanner (remove '::' in front of the following
  55. :: two lines).
  56. :: F-PROT.EXE *.* /NOMEM /NOBREAK
  57. :: IF ERRORLEVEL 1 GOTO Virus
  58. ::
  59. :: If source = .EXE, rename target because of name conflict.
  60. IF %AEXT%!==.EXE! IF EXIST %ANAME%%AEXT% REN %ANAME%%AEXT% *.EXO
  61. ::
  62. :: Pack archive in ACE format.
  63. ACE.EXE m %SFX% -r -s -m5 -d1024 -y %ANAME%
  64. :: Or with addition of archive comment:
  65. :: ACE.EXE m %SFX% -r -s -m5 -d1024 -y -zC:\LOGOS\LOGO.ANS %ANAME%
  66. ::
  67. :End1
  68. :: Erase temporary directory.
  69. CLS
  70. ECHO.
  71. TDIR.EXE C:\TEMP /D
  72. ::
  73. :: In case of virus test activate the following lines (remove '::'s).
  74. :::Virus
  75. :: CLS
  76. :: ECHO.
  77. :: ECHO    Attention: A virus was found!!!
  78. :: ECHO.
  79. ::
  80. :End2
  81. :: Unset environment variables set by TDir.
  82. SET TDIR=
  83. SET ADIR=
  84. SET ANAME=
  85. SET AEXT=
  86. SET SFX=
  87.