home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware 1 2 the Maxx
/
sw_1.zip
/
sw_1
/
GENEFILE
/
FT119D.ZIP
/
UPDATE.BAT
< prev
next >
Wrap
DOS Batch File
|
1989-10-09
|
8KB
|
242 lines
echo off
cls
echo .
if not %1x==x goto SYNTAXOK
echo UPDATE requires the database name (DBNAME) of the database
echo being updated to be included on the command line thus:
echo .
echo UPDATE DBNAME(ret)
echo .
echo If the name of the OLD database files is not known then
echo see DIR of old data disk for - DBNAME.DA1 file (DBNAME is the
echo of the database files)
goto PRMT
:SYNTAXOK
echo Checking disk for presence of all needed files
IF EXIST A:COMMAND.COM GOTO CHKA
ECHO .
ECHO The disk in drive A: is either the FAMILY TIES master or
ECHO the COPY does not have the system files (DOS) on it.
ECHO You MUST use a copy of the FAMILY TIES master with system files
ECHO on it, to run this UPDATE batch file...... aborting UPDATE
:PRMT
ECHO .
ECHO ..... Please wait for system prompt .....
GOTO END
:CHKA
if not exist QUERY.COM goto MQ
if not exist FT.EXE goto MF
if not exist FTCOLOR.DAT goto MF
if not exist PRINT.CTR goto MF
if not exist FGRSH.INS goto MF
if not exist NAMES.DA1 goto MF
if not exist NAMES.NTS goto MF
if not exist FTINSTAL.EXE goto MF
if not exist FTINSTAL.DAT goto MF
VERIFY ON
cls
echo .
echo **********************************************************
echo * This program will automatically go through all the *
echo * steps to create a database using ver 1.19 and will *
echo * transfer the OLD data from an earlier FAMILY TIES *
echo * version to the new database. *
echo * NOTE: if using v1.09 or earlier you must use the file *
echo * FT110FIX.EXE supplied with v1.10 before using UPDATE. *
echo **********************************************************
echo .
echo * Type of data disk storage
echo *
echo * F Floppy disks
echo * H Hard disk
query * Enter type of disk: F or H @HF
if errorlevel 2 goto FLOPPY
echo Reading file, please wait ...
goto HARD
:FLOPPY
cls
echo **********************************************************
echo * FLOPPY DISK install: *
echo * before continuing with this program you must have: *
echo * One blank formatted disk with DOS - labeled as *
echo * PROGRAM DISK (1.19) [ format with FORMAT B:/S ] *
echo * One blank formatted disk without DOS - labeled as *
echo * DATA DISK (1.19) [ format with FORMAT B: ] *
echo * A copy of FAMILY TIES v1.19 master in drive A: *
echo * The OLD program & data disks with write protect *
echo * tabs on each for safety. *
echo **********************************************************
query Do you wish to proceed Y/N @YN
if errorlevel 2 goto PRMT
ECHO Place the blank disk with DOS in drive B: (PROGRAM DISK 1.19)
pause
IF EXIST B:COMMAND.COM GOTO CPY0
ECHO The disk in drive B: is NOT a system disk
ECHO You will not be able to use the PROGRAM disk to boot your computer
ECHO Do you wish to start over and create a
QUERY PROGRAM disk with a system on it? (Y/N) @NY
IF ERRORLEVEL 2 GOTO PRMT
:CPY0
echo Copying program files to the PROGRAM disk
COPY FT.EXE B:
COPY FTCOLOR.DAT B:
COPY FGRSH.INS B:
COPY PRINT.CTR B:
COPY NAMES.DA1 B:
COPY NAMES.NTS B:
COPY FTINSTAL.EXE B:
COPY FTINSTAL.DAT B:
COPY QUERY.COM B:
COPY UPDATE.BAT B:
echo .
echo NOW:
echo 1. Remove the MASTER (copy) from A:
echo 2. Move the PROGRAM DISK 1.19 from B: to A:
echo 3. Place the blank formatted disk without DOS in B: (DATA DISK 1.19)
pause
:VER
if not exist README goto INST
echo .
echo WARNING!!!! The disk in A: appears to be a MASTER
echo Please check and insert the correct disk
echo .
echo C Continue the disc is correct
echo D Disk has been changed - continue
query Enter C or D @CD
if errorlevel 2 goto VER
:INST
COPY QUERY.COM B:
COPY UPDATE.BAT B:
cls
echo .
echo The FTINSTAL program will now be run. Please choose option A to
echo create a new database and when asked for a NAME for the database
echo you must use the same one as used when the old data was created.
echo This should be %1
echo NOTE: The files PRINT.CTR, FGRSH.INS & FTCOLOR.DAT are located on A:
echo You will also be asked to enter you own name as Preparer.
query Do you wish continue Y/N @YN
if errorlevel 2 goto END
FTINSTAL
ECHO OFF
query Did the message 'THESE DISKS ARE NOW READY FOR USE' appear Y/N @NY
if errorlevel 2 goto CPY
echo .
echo The install was not sucessful - reformat the disks and start over!!!
goto END
:CPY
cls
echo .
echo Remove the NEW DATA 1.19 disk from B:
echo Place the OLD program disk in B:
pause
echo .
echo Copying OLD data files from B: to A:
echo (If PC-JR or all files on the data disk then no files will be found)
if not exist %1.DA4 goto PCJR
DEL %1.*
COPY B:%1.*
:PCJR
echo .
echo 1. Remove NEW PROGRAM 1.19 disk from A:
echo 2. Remove OLD program disk from B: and save it in case of error
echo 3. Place the NEW DATA 1.19 disk in A:
echo 4. Place the OLD data disk in B:
pause
echo .
echo Copying the data files . . .
COPY B:%1.*
echo .
echo 1. Remove the OLD data disk from B:
echo 2. Move the NEW DATA 1.19 disk from A: to B:
echo 3. Place the NEW PROGRAM 1.19 disk in A:
pause
echo deleting the UPDATE and QUERY files from the NEW DATA 1.19 disk
DEL B:UPDATE.BAT
DEL B:QUERY.COM
:END1
del QUERY.COM
echo .
echo The 1.19 data base (with old data) is now ready for use
echo Ignore BATCH file missing error (UPDATE.BAT has been deleted)
del UPDATE.BAT
REM end of file - file deleted!!!
:HARD
cls
echo .
echo *******************************************************
echo * HARD DISK INSTALL *
echo * Before running UPDATE you should have created a *
echo * new subdirectory and made this subdir the default *
echo * for the C/D drive. Place the new Program disk in A:*
echo * enter A:UPDATE DBNAME(ret) *
echo * Also make a BACKUP copy of the 4 OLD data files. *
echo *******************************************************
query Do you wish to continue? Y/N @YN
if errorlevel 2 goto END
query Enter the hard disk letter C or D @CD
if errorlevel 2 goto D2
echo .
C:
echo Copying all files to the HARD DISK
copy a:*.* c:/v
if exist C:%1.DA1 goto WARN
goto HARD1
:D2
echo .
D:
echo Copying all files to the HARD DISK
copy a:*.* d:/v
if not exist D:%1.DA1 goto HARD1
:WARN
echo WARNING - There are data files for %1 datbase in this sub-dir
echo These files will be erased -
echo Do you really want to do this?
query N will abort. Y will cause files to be erased Y/N @YN
if errorlevel 2 goto END
query Just checking - You really do want to erase the data files Y/N @YN
if errorlevel 2 goto END
DEL %1.*
:HARD1
echo .
echo The FTINSTAL program will now be run. Please choose option A to
echo create a new database and when asked for a NAME for the database
echo you must use the same one as used when the old data was created.
echo This should be %1
echo Use the HARD DISK letter for the location of FTCOLOR.DAT, PRINT.CTR, FGRSH.INS
echo You will also be asked to enter you own name as the Preparer.
query Do you wish continue Y/N @YN
if errorlevel 2 goto END
FTINSTAL
query Did the message 'THESE DISKS ARE NOW READY FOR USE' appear? Y/N @YN
if not errorlevel 2 goto CPYH
echo .
echo The install was not sucessful - del this sub dir and start over!!!
goto END
:CPYH
echo The NEW data files will now be deleted . . .
if exist %1.DA1 goto CPY1
echo WARNING The NEW data files do NOT match the OLD files - %1
echo Unable to continue - UPDATE aborted - wait for prompt . . .
goto END
:CPY1
DEL %1.*
echo .
echo Now use COPY to transfer the OLD data files into this NEW database
echo Erase the subdir containing the old database (if you have back-ups)
goto END1
:MQ
echo .
echo The file QUERY.COM is missing from this disk please copy from master
goto END
:MF
echo .
echo One of the following files is missing from this disk:
echo .
echo FT.EXE FTCOLOR.DAT PRINT.CTR FGRSH.INS
echo NAMES.DA1 NAMES.NTS FTINSTAL.EXE FTINSTAL.DAT
echo .
echo Here is the DIR of this disk:-
DIR/w
:END