@echo off
: Rescue Disk                                
: CheckûIt 4
: TouchStone Software Corporation
: Copyright (c) 1989-1996 ALL RIGHTS RESERVED

if exist CKRESCUE.JNL del CKRESCUE.JNL 
echo.                                                                               >> CKRESCUE.JNL
echo                                 CheckûIt 4                                     >> CKRESCUE.JNL
echo.                               CKRESCUE.BAT                                    >> CKRESCUE.JNL
echo                     TouchStone Software Corporation                            >> CKRESCUE.JNL
echo               Copyright (c) 1989-1996 ALL RIGHTS RESERVED                      >> CKRESCUE.JNL
echo.                                                                               >> CKRESCUE.JNL
echo.    -----------------------------------------------------------------------    >> CKRESCUE.JNL
echo. >> CKRESCUE.JNL


::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:Loading
if "%1"=="" goto help
if "%2"=="" goto help
if "%3"=="" goto help

if "%2"=="/HELP" goto help
if "%2"=="/help" goto help
goto Start

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:help
echo CKRESCUE - Rescue Disk                       CheckûIt 4 
echo Copyright (c) 1989-1996 ALL RIGHTS RESERVED         
echo TouchStone Software Corporation
echo Usage: CKRESCUE BootDrive DOSDir DestinDir DestinFloppy
echo.
echo.Where: BootDrive            The letter of the boot drive
echo        DOSDrive             The location of DOS
echo        DestinDir            The destination drive and path
echo        DestinFloppy         The destination drive for floppy drives
echo.
echo Files to be moved:
echo.
echo DOS boot files:    COMMAND.COM          CheckûIt 4 support files: CKCMOS.EXE
echo                    CONFIG.SYS                                     CKCMOS.DAT
echo                    AUTOEXEC.BAT                                   CKVIEW.EXE  
echo                                                                   
echo DOS support files: SYS.COM                                          
echo                    FDISK.EXE                      
echo                    FORMAT.COM                     
echo                    
echo                    
echo.
echo Example: CKRESCUE C: C:\DOS A:\ A:
echo CKRESCUE /HELP displays this help screen
echo.
goto end

:Start
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
if "%4" =="A:" goto System
if "%4" =="B:" goto System
if "%4" =="a:" goto System
if "%4" =="b:" goto System

goto NOSystem

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:System
echo Moving system files
if not exist %2\SYS.COM echo     Error %2\SYS.COM was not found >> CKRESCUE.JNL
%2\sys %1\ %4%
:DRDOS Support
if "%OS%" == "DRDOS" %2\sys %4

%2\label %4%CHECKIT
copy RESCUEME.TXT %3

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:NOSystem
echo Saving and moving CMOS data 
if not exist CKCMOS.EXE echo     Error CKCMOS.EXE was not found >> CKRESCUE.JNL
CKCMOS  CKCMOS.DAT /T:S /N:"Clone CMOS data"
copy CKCMOS.DAT %3


::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
echo Moving Boot support files
if not exist C:\CONFIG.SYS echo     Error C:\CONFIG.SYS was not found >> CKRESCUE.JNL
copy %1\CONFIG.SYS %3CONFIG.SAV
if not exist C:\AUTOEXEC.BAT echo     Error C:\AUTOEXEC.BAT was not found >> CKRESCUE.JNL
copy %1\AUTOEXEC.BAT %3AUTOEXEC.SAV


::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
echo Moving Drivers and support files
if not exist CKDRIVER.EXE echo     Error CKDRIVER.EXE was not found >> CKRESCUE.JNL
ckdriver %1 %2 %3


::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
echo Moving DOS support files
if not exist %2\SYS.COM echo     Error %2\SYS.COM was not found >> CKRESCUE.JNL
copy %2\SYS.COM %3

if not exist %2\FDISK.* echo     Error %2\FDISK.* was not found >> CKRESCUE.JNL
copy %2\FDISK.* %3

if not exist %2\FORMAT.* echo     Error %2\FORMAT.* was not found >> CKRESCUE.JNL
copy %2\FORMAT.* %3


::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
echo Moving CheckûIt support files
if not exist CKCMOS.EXE echo     Error CKCMOS.EXE was not found >> CKRESCUE.JNL
copy CKCMOS.EXE %3

if not exist CKCMOS.DAT echo     Error CKCMOS.DAT was not found >> CKRESCUE.JNL
copy CKCMOS.DAT %3

if not exist CKVIEW.EXE echo     Error CKVIEW.EXE was not found >> CKRESCUE.JNL
copy CKVIEW.EXE %3

goto exit


::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:exit

echo. >> CKRESCUE.JNL
if exist %3COMMAND.COM     echo     SYSTEM FILES............................................. Rescued >> CKRESCUE.JNL
if not exist %3COMMAND.COM echo     SYSTEM FILES..........................................NOT Rescued >> CKRESCUE.JNL

echo. >> CKRESCUE.JNL
if exist %3CKCMOS.DAT      echo     CMOS DATA.................................................Rescued >> CKRESCUE.JNL
if not exist %3CKCMOS.DAT  echo     CMOS DATA.............................................NOT Rescued >> CKRESCUE.JNL

echo. >> CKRESCUE.JNL
if exist %3CONFIG.SAV      echo     BOOT SUPPORT FILES........................................Rescued >> CKRESCUE.JNL
if not exist %3CONFIG.SAV  echo     BOOT SUPPORT FILES....................................NOT Rescued >> CKRESCUE.JNL

echo. >> CKRESCUE.JNL
if exist %3CONFIG.SAV      echo     DRIVERS AND SUPPORT FILES.................................Rescued >> CKRESCUE.JNL
if not exist %3CONFIG.SAV  echo     DRIVERS AND SUPPORT FILES.............................NOT Rescued >> CKRESCUE.JNL

echo. >> CKRESCUE.JNL
if exist %3SYS.*           echo     DOS SUPPORT FILES.........................................Rescued >> CKRESCUE.JNL
if not exist %3SYS.*       echo     DOS SUPPORT FILES.....................................NOT Rescued >> CKRESCUE.JNL

echo. >> CKRESCUE.JNL
if exist %3CK*.*           echo     CHECKûIT SUPPORT FILES....................................Rescued >> CKRESCUE.JNL
if not exist %3CK*.*       echo     CHECKûIT SUPPORT FILES................................NOT Rescued >> CKRESCUE.JNL

echo. >> CKRESCUE.JNL
echo Moving Ckrescue journal 
DIR %3 >> CKRESCUE.JNL
copy CKRESCUE.JNL %3

cls
ckview %3CKRESCUE.JNL

:end




