home *** CD-ROM | disk | FTP | other *** search
/ Popular Software (Premium Edition) / mycd.iso / TOOLS / ACE11B / REACE / REACE.BTM < prev    next >
Encoding:
Text File  |  1997-11-30  |  2.8 KB  |  79 lines

  1. @ECHO OFF
  2. CLS
  3. ECHO.
  4. ECHO ------------------------------------------------------------------------
  5. ECHO REACE.BTM for 4DOS 5.x and higher               (C) Juergen Peters, 1997
  6. ECHO ------------------------------------------------------------------------
  7. ECHO Version 0.12                                                  11-01-1997
  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. ::  UU.EXE and ACE.EXE must be located in DOS's PATH or being completed by
  13. ::  the full pathname to make this batch work.
  14. ::---------------------------------------------------------------------------
  15. ::
  16. :: Little syntax help if no parameter given or archive not found.
  17. IFF NOT EXIST %1 THEN
  18. ECHO   Syntax:  REACE ARCHIV.EXT [further parameters for UU; optional]
  19. ECHO.
  20. QUIT
  21. ENDIFF
  22. ::
  23. :: Store archive name and path in environment.
  24. SET/M ANAME=%@PATH[%@EXPAND[%1]]%@NAME[%1]
  25. SET/M AEXT=%@EXT[%1]
  26. IF %@EXT[%1]!==EXE! SET/M SFX=-sfx
  27. ::
  28. :: Early detection of unknown or already ACE file as errortrap for REACEALL *.*.
  29. :: If another packer than ACE.EXE is used, please change the corresponding
  30. :: errorlevel 90 to the one of the other format, eg. 15 for RAR.
  31. UU.EXE %ANAME.%AEXT /I>&NUL
  32. IF %?==90 .OR. %?==0 (UNSET/M ANAME AEXT SFX>&NUL^QUIT)
  33. ::
  34. :: Create temporary directory und change into it
  35. MD/S C:\TEMP\REACE$$$.$$$>&NUL
  36. PUSHD C:\TEMP\REACE$$$.$$$
  37. ::
  38. :: Unpack the source archive with UU.EXE. Please adjust parameters to
  39. :: reflect your own needs (eg. when using /D the source archive is deleted
  40. :: after extraction).
  41. UU.EXE %ANAME.%AEXT .\ /R /X %2&
  42. IF ERRORLEVEL 1 GOTO End
  43. ::
  44. :: Optionally call virus scanner (remove '::' in front of the following
  45. :: two lines).
  46. :: F-PROT.EXE *.* /NOMEM /NOBREAK
  47. :: IF ERRORLEVEL 1 GOTO Virus
  48. ::
  49. :: If source = .EXE, rename target because of name conflict.
  50. IF %AEXT!==EXE! IF EXIST %ANAME.%AEXT REN/Q %ANAME.%AEXT %ANAME.EXO
  51. ::
  52. :: Pack archive in ACE format.
  53. ACE.EXE m %SFX -r -s -m5 -d1024 -y %ANAME
  54. :: Or with addition of archive comment:
  55. :: ACE.EXE m %SFX -r -s -m5 -d1024 -y -zC:\LOGOS\LOGO.ANS %ANAME
  56. ::
  57. :: Or packing into another format, eg. RAR or ARJ (the errorlevel in the
  58. :: above line UU.EXE .. /I has to be changed correspondingly!):
  59. ::
  60. :: RAR.EXE m %SFX -r -s -m5 -y -c- %ANAME
  61. ::
  62. :: With ARJ.EXE also line SET SFX= has to be changed: ... SET SFX=-je (or -je1).
  63. :: ARJ.EXE m %SFX -r -jm -jyyco %ANAME
  64. ::
  65. :End
  66. :: Erase temporary directory.
  67. POPD
  68. CD C:\
  69. DEL/Y/Q/S/X/Z C:\TEMP\REACE$$$.$$$>&NUL
  70. UNSET/M ANAME AEXT SFX>&NUL
  71. QUIT
  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.