home *** CD-ROM | disk | FTP | other *** search
- @ECHO OFF
- CLS
- ECHO.
- ECHO ------------------------------------------------------------------------
- ECHO REACE.BAT (C) Juergen Peters, 1998
- ECHO ------------------------------------------------------------------------
- ECHO Version 0.12a 05-10-1998
- ECHO ------------------------------------------------------------------------
- ECHO.
- :: Batchfile to convert any given archive into the ACE format (or any other)
- :: using UU.EXE ("Universal Unpacker").
- :: TDIR.EXE, 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.
- IF EXIST %1 GOTO Unpack
- ECHO Syntax: REACE ARCHIV.EXT [further parameters for UU; optional]
- ECHO.
- GOTO End2
- ::
- :Unpack
- :: Store archive name and path in environment.
- SET ANAME=%1
- ::
- :: TDir creates a temporary directory and changes into it. It analyses
- :: the filename and sets the environment variables TDIR, ADIR and AEXT.
- :: If an error occurs it outputs a message and stops.
- TDIR.EXE C:\TEMP
- IF ERRORLEVEL 1 GOTO End2
- IF %AEXT%!==.EXE! SET 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 (90+1) to the one of the other format, eg. 15 (15+1) for RAR.
- UU.EXE %ANAME%%AEXT% /I>NUL
- IF ERRORLEVEL 90 IF NOT ERRORLEVEL 91 GOTO End1
- IF ERRORLEVEL 0 IF NOT ERRORLEVEL 1 GOTO End1
- ::
- :: 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 %3 %4 %5 %6 %7 %8 %9
- IF ERRORLEVEL 1 GOTO End1
- ::
- :: 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
- ::
- :: 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 %ANAME%%AEXT% *.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%
- ::
- :End1
- :: Erase temporary directory.
- CLS
- ECHO.
- TDIR.EXE C:\TEMP /D
- ::
- :: In case of virus test activate the following lines (remove '::'s).
- :::Virus
- :: CLS
- :: ECHO.
- :: ECHO Attention: A virus was found!!!
- :: ECHO.
- ::
- :End2
- :: Unset environment variables set by TDir.
- SET TDIR=
- SET ADIR=
- SET ANAME=
- SET AEXT=
- SET SFX=
-