home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Best Sellers 25: Space Games Classics 2
/
cd_1.iso
/
bsspace2
/
space
/
lastof
/
install.bat
< prev
next >
Wrap
DOS Batch File
|
1993-11-29
|
2KB
|
88 lines
echo off
if "%1"=="" goto usage
if "%2"=="" goto usage
goto start
:usage
echo This command installs the program by copying the files from a floppy
echo disk, to your hard disk. If you have already done this, no further
echo installation is needed - type LOTF to run the game, or README for more
echo information.
echo.
echo To copy the files to the hard disk, enter:
echo.
echo INSTALL source-drive destination-drive [optional-directory-name]
echo.
echo The directory defaults to \LOTF if it is not specified.
echo.
echo E.g.
echo.
echo INSTALL A: C:
echo.
echo to copy the files from the disk in drive A:, to the directory \LOTF
echo on drive C:.
echo.
echo The destination directory is created if it does not already exist. Note
echo that if a path is specified, such as \GAMES\LOTF, only the final
echo subdirectory can be created - the remaining directories must already
echo exist (\GAMES in this example).
goto done
:start
if not exist %1lotfdsk1.id goto badsrc
if "%3"=="" goto defdir
rem Check/create user specified directory
if not exist %2%3\nul echo Creating directory %2%3...
if not exist %2%3\nul mkdir %2%3
if not exist %2%3\nul goto dirfail
if exist %2%3\hiscore.dat copy %2%3\hiscore.dat %2%3\hiscore.old
echo Copying files to %2%3...
xcopy %1*.* %2%3
if errorlevel 1 goto copyfail
%2
cd %3
goto success
:defdir
rem Check/create default directory
if not exist %2\LOTF\nul echo Creating directory %2\LOTF...
if not exist %2\LOTF\nul mkdir %2\LOTF
if not exist %2\LOTF\nul goto dirfail
if exist %2\LOTF\hiscore.dat copy %2\LOTF\hiscore.dat %2\LOTF\hiscore.old
echo Copying files to %2\LOTF...
xcopy %1*.* %2\LOTF\
if errorlevel 1 goto copyfail
%2
cd \LOTF
:success
echo.
echo Installation complete. Type LOTF to start the game.
if not exist hiscore.old goto done
echo.
echo The old hi-score data has been saved in HISCORE.OLD. Use
echo.
echo COPY HISCORE.OLD HISCORE.DAT
echo.
echo to restore the old scores.
echo.
echo If you have just installed a different version of the program, run
echo SETUP now to select any newly available options.
goto done
:badsrc
echo INSTALL: The source drive does not contain the program files.
echo.
echo Type INSTALL, without any arguments, for instructions.
goto done
:dirfail
echo INSTALL: Unable to create destination directory.
goto done
:copyfail
echo INSTALL: File copy failed.
:done