home *** CD-ROM | disk | FTP | other *** search
- @ECHO OFF
- CLS
- ECHO.
- ECHO ------------------------------------------------------------------------
- ECHO REACE.BTM for 4DOS 5.x and higher (C) Juergen Peters, 1997
- ECHO ------------------------------------------------------------------------
- ECHO Version 0.12 11-01-1997
- ECHO ------------------------------------------------------------------------
- ECHO.
- :: Batchfile to convert any given archive into the ACE format (or any other)
- :: using UU.EXE ("Universal Unpacker").
- :: UU.EXE and ACE.EXE must be located in DOS's PATH or being completed by
- :: the full pathname to make this batch work.
- ::---------------------------------------------------------------------------
- ::
- :: Little syntax help if no parameter given or archive not found.
- IFF NOT EXIST %1 THEN
- ECHO Syntax: REACE ARCHIV.EXT [further parameters for UU; optional]
- ECHO.
- QUIT
- ENDIFF
- ::
- :: Store archive name and path in environment.
- SET/M ANAME=%@PATH[%@EXPAND[%1]]%@NAME[%1]
- SET/M AEXT=%@EXT[%1]
- IF %@EXT[%1]!==EXE! SET/M SFX=-sfx
- ::
- :: Early detection of unknown or already ACE file as errortrap for REACEALL *.*.
- :: If another packer than ACE.EXE is used, please change the corresponding
- :: errorlevel 90 to the one of the other format, eg. 15 for RAR.
- UU.EXE %ANAME.%AEXT /I>&NUL
- IF %?==90 .OR. %?==0 (UNSET/M ANAME AEXT SFX>&NUL^QUIT)
- ::
- :: Create temporary directory und change into it
- MD/S C:\TEMP\REACE$$$.$$$>&NUL
- PUSHD C:\TEMP\REACE$$$.$$$
- ::
- :: Unpack the source archive with UU.EXE. Please adjust parameters to
- :: reflect your own needs (eg. when using /D the source archive is deleted
- :: after extraction).
- UU.EXE %ANAME.%AEXT .\ /R /X %2&
- IF ERRORLEVEL 1 GOTO End
- ::
- :: Optionally call virus scanner (remove '::' in front of the following
- :: two lines).
- :: F-PROT.EXE *.* /NOMEM /NOBREAK
- :: IF ERRORLEVEL 1 GOTO Virus
- ::
- :: If source = .EXE, rename target because of name conflict.
- IF %AEXT!==EXE! IF EXIST %ANAME.%AEXT REN/Q %ANAME.%AEXT %ANAME.EXO
- ::
- :: Pack archive in ACE format.
- ACE.EXE m %SFX -r -s -m5 -d1024 -y %ANAME
- :: Or with addition of archive comment:
- :: ACE.EXE m %SFX -r -s -m5 -d1024 -y -zC:\LOGOS\LOGO.ANS %ANAME
- ::
- :: Or packing into another format, eg. RAR or ARJ (the errorlevel in the
- :: above line UU.EXE .. /I has to be changed correspondingly!):
- ::
- :: RAR.EXE m %SFX -r -s -m5 -y -c- %ANAME
- ::
- :: With ARJ.EXE also line SET SFX= has to be changed: ... SET SFX=-je (or -je1).
- :: ARJ.EXE m %SFX -r -jm -jyyco %ANAME
- ::
- :End
- :: Erase temporary directory.
- POPD
- CD C:\
- DEL/Y/Q/S/X/Z C:\TEMP\REACE$$$.$$$>&NUL
- UNSET/M ANAME AEXT SFX>&NUL
- QUIT
- ::
- :: In case of virus test activate the following lines (remove '::'s).
- :::Virus
- :: CLS
- :: ECHO.
- :: ECHO Attention: A virus was found!!!
- :: ECHO.
-