home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1995 November
/
PCWK1195.iso
/
inne
/
podstawy
/
dos
/
4dos
/
4uzytki
/
arconv01.exe
/
INSTALL.BTM
< prev
next >
Wrap
Text File
|
1993-06-28
|
4KB
|
123 lines
@echo off
loadbtm on
setlocal
:: Install.btm, ver 1.0, June 21 1993, By E.T.C
:: This script interactively installs the scripts for my archive utils.
:: It requires the following files: a?.dat; da?.dat; compstat.awk; to?.dat
echo.
echo.
echo This script creates and installs the archive managament files in your harddisk.
inkey /k"ynYN" would you like to proceed with installation (y/n)? %%YN
if "%YN" == "n" goto finish
if "%YN" == "N" goto finish
echo You'll be able to abort by anytime by pressing enter only for any question.
:getbtmpath
echo.
echo Choose a directory to place the .BTM script files. A good choice is a-
echo directory which is included in your PATH. Enter the FULL path without the-
echo trailing backslash (e.g C:\BAT), or just enter to abort.
input %%BTMPATH
if "%BTMPATH" == "" goto finish
if isdir %BTMPATH goto contbtm
beep
echo.
echo %BTMPATH is not a valid path name! Please retry.
goto getbtmpath
:contbtm
iff "%@SUBSTR[%BTMPATH, 0, -1]" == "\" then
beep
echo Path must not end with backslash (\). Please retry
goto getbtmpath
endiff
:getarcpath
echo.
echo Please type the directory where your archivers are placed. Enter the FULL-
echo path without the backslash (e.g C:\UTILITY\ZIP), or just enter to abort.
input %%ARCPATH
if "%ARCPATH" == "" goto finish
if isdir %ARCPATH goto contarc
beep
echo.
echo %ARCPATH is not a valid path name! Please retry.
goto getarcpath
:contarc
iff "%@SUBSTR[%ARCPATH, 0, -1]" == "\" then
beep
echo Path must not end with backslash (\). Please retry.
goto getarcpath
endiff
:getlogpath
unset /q LOGPATH
echo.
echo The archive converter has an option to keep logging of its results, on
echo which some statistics can be calculated using compstat.btm in this package.
inkey /k"yYnNaA" Would you like to enable the logging (Yes/No/Abort)? %%YN
if "%yn" == "a" goto finish
if "%yn" == "A" goto finish
if "%yn" == "n" goto install
if "%yn" == "N" goto install
echo.
echo Please choose a filename for the log file. Enter the FULL path of the file-
echo (e.g C:\UTILITY\ZIP\STATS.DAT), or just enter to abort.
input %%LOGPATH
if "%LOGPATH" == "" goto finish
if not exist %LOGPATH goto contlog
beep
echo.
echo %LOGPATH Already exists! Please retry.
goto getlogpath
:contlog
echo Please enter the path of an AWK compatible program. Enter the FULL path-
echo no need for extension (e.g C:\UTILITY\GAWK), or just enter to abort.
input %%AWKPATH
if "%AWKPATH" == "" goto finish
set LOGPATH=%@FULL[%LOGPATH]
set AWKPATH=%@FULL[%AWKPATH]
echo Original_archive Original_size New_archive New_size > %LOGPATH
:install
echo Installing files - please wait...
copy /q a1.dat %BTMPATH\a.btm
echo set BASEDIR=%ARCPATH >> %BTMPATH\a.btm
copy /q %BTMPATH\a.btm + a2.dat %BTMPATH\a.btm
copy /q da1.dat %BTMPATH\da.btm
echo set BASEDIR=%ARCPATH >> %BTMPATH\da.btm
copy /q %BTMPATH\da.btm + da2.dat %BTMPATH\da.btm
copy /q to1.dat %BTMPATH\to.btm
echo call %BTMPATH\da.btm ..\%%RUN >> %BTMPATH\to.btm
echo if errorlevel 1 goto error >> %BTMPATH\to.btm
echo call %BTMPATH\a.btm %%ARC -r %%FILENAME >> %BTMPATH\to.btm
copy /q %BTMPATH\to.btm + to2.dat %BTMPATH\to.btm
iff "%LOGPATH" == "" then
copy /q %BTMPATH\to.btm + to3.dat %BTMPATH\to.btm
else
echo echo %%@LOWER[%%@EXT[..\%%RUN]] %%OLD %%@LOWER[%%ARC] %%NEW >> %LOGPATH >> %BTMPATH\to.btm
copy /q %BTMPATH\to.btm + to3.dat %BTMPATH\to.btm
echo echo Calculating... Please wait > %BTMPATH\compstat.btm
echo %AWKPATH -f %BTMPATH\compstat.awk %LOGPATH >> %BTMPATH\compstat.btm
copy /q compstat.awk %BTMPATH
endiff
echo.
echo.
echo Installation completed, Commands ready to use.
echo Note that the commands a.btm & da.btm have various archivers with the-
echo switches I believe are most comfortable. However, if you wish to add/delete-
echo an archiver from the list, or modify any of their options, you can do it
echo easily with an editor. They're both easy to understand and modify.
:finish
endlocal
quit