@echo off
cls
echo
echo          ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo          º    I QUALIFY HARD DRIVE INSTALLATION BATCH PROGRAM      º
echo          º    This batch program makes a directory named QUALIFY   º
echo          º    on C: drive and then copies all the program disk     º
echo          º    files to the C:\QUALIFY sub-directory.               º
echo          º        Insert the Program Disk in Drive A:              º
echo          º    Press ENTER to continue or Ctrl+Break to abort.      º
echo          ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ¼
echo/

rem Check arguments
if not "%1" == "" goto be_sure
if not "%2" == "" goto be_sure
if not "%3" == "" goto be_sure

rem Show usage summary
echo    Usage: INSTALL (disk-count) (source-drive) (destination-drive)
echo/
echo    Where:
echo    disk-count        is the number of floppy disks, 1
echo    source-drive      is a: or b:
echo    destination-drive is c:, d:, etc
echo    Example:          INSTALL 1 a: c:
echo    "Type-in QINSTALL 1 a: c: to install I QUALIFY onto C:> drive"
echo    "Type-in QINSTALL 1 a: b: to install I QUALIFY onto Floppy Drive"
echo    "Type-in QINSTALL 1 a: d: to install I QUALIFY onto D:> drive"
echo    "If your Floppy disk is B:>, Type-in QINSTALL 1 b: c:"
echo/
goto end
:be_sure
echo/
echo    This program performs only minimal error checking; be sure your
echo    parameters are correct.
echo/
echo    Number of disks:  %1
echo    Source:           %2
echo    Destination:      %3\qualify
echo/
pause

rem Make destination directory
echo Creating %3\qualify
if not exist %3\qualify\*.* mkdir %3\qualify
echo test >%3\qualify\test.txt
if exist %3\qualify\test.txt goto copy
    echo %0: error unable to create %3\qualify
    goto end
:copy
del %3\qualify\test.txt

echo/
echo    Press ENTER to Continue or CTRL+break to Abort
pause

rem Move to distribution disk
if exist %2\EASY-Q15.EXE goto disk1
    echo %0: error %2\EASY-Q15.EXE not found
    goto end
:disk1

echo    Copying files from distribution disk
copy %2\ %3\qualify

if %1 == 1 goto decompress

:decompress

rem Move to destination
%3
chdir %3\qualify
if exist EASY-Q15.EXE goto chdir_ok
    echo %0: error moving to %3\qualify (EASY-Q15.EXE not found)
    goto end
:chdir_ok
rem Decompress files
if exist EASY-Q15.EXE  EASY-Q15.EXE


:exist_eagent

rem Done
cls
echo/
echo    I QUALIFY 1.5 for MS-DOS, installation complete.
echo    Type-in QUALIFY and press enter to start the program.
echo
:end
echo/