* ARCHIVE.CMD
* M. Lynn
* VERSION 1.6
ERASE
SET INTENSITY OFF
STORE 2 TO maxdrive
STORE $(DATE(),7,2) TO year
STORE T TO ok
DO WHILE ok
@ 15, 0 SAY '-------------------------------------------------------------------'
@ 16, 0 SAY '|                                                                 |'
@ 17, 0 SAY '|                                                                 |'
@ 18, 0 SAY '|                                                                 |'
@ 19, 0 SAY '|                                                                 |'
@ 20, 0 SAY '|                                                                 |'
@ 21, 0 SAY '-------------------------------------------------------------------'

@ 16, 3 SAY 'Enter a number that indicates the maximum number of drives'
@ 17, 3 SAY 'in use on your system -- if you ask for files to be copied'
@ 18, 3 SAY 'to a drive that is not really available, nasty things can'
@ 19, 3 SAY 'happen to your .dbf files! --- ' GET maxdrive PICTURE '9'
READ
IF maxdrive < 2 .OR. maxdrive > 5
@ 16, 0 SAY '|                                                                 |'
@ 17, 0 SAY '|                                                                 |'
@ 18, 0 SAY '|                                                                 |'  
@ 19, 0 SAY '|                                                                 |'
@ 16, 5 SAY 'NO SUCH LUCK, PLEASE TRY A NUMBER BETWEEN 2 AND 5'
@ 20, 5 SAY 'ENTER ANY CHARACTER: '
SET CONSOLE OFF
WAIT
SET CONSOLE ON
ERASE
LOOP
ELSE
STORE F TO ok
ENDDO

DO WHILE T
ERASE
@ 5, 3 SAY ' '
@ 7, 3 SAY ' ' 
@ 9, 3 SAY ' '
@ 11, 3 SAY ' '
@ 15, 0 SAY '-------------------------------------------------------------------'
@ 16, 0 SAY '|                                                                 |'
@ 17, 0 SAY '|                                                                 |'
@ 18, 0 SAY '|                                                                 |'
@ 19, 0 SAY '|                                                                 |'
@ 20, 0 SAY '|                                                                 |'
@ 21, 0 SAY '-------------------------------------------------------------------'
@ 1, 20 SAY 'CHECKBOOK ARCHIVE MENU'
@ 2, 20 SAY '========= ======= ===='
@ 3, 5 SAY '1-  Archive files'
@ 5, 5 SAY '2-  Restore archived files'
@ 7, 5 SAY '3-  Perform backups'
@ 9, 5 SAY '4-  Check for out-of-date records'
@ 11, 5 SAY '5-  Help information <--- read before using the above utilities'
@ 13, 5 SAY '6-  Return to Main Menu'
SET CONSOLE OFF
WAIT TO which
SET CONSOLE ON

DO CASE

CASE which = '1'
@ 3, 3 SAY '*'
DO PURGE

CASE which = '2'
@ 5, 3 SAY '*'
DO RESTORE

CASE which = '3'
@ 7, 3 SAY '*'
DO BACKUP

CASE which = '4'
@ 9, 3 SAY '*'
DO YEAR

CASE which = '5'
@ 11, 3 SAY '*'
DO ARHELP

CASE which = '6'
@ 13, 3 SAY '*'
ERASE
RELEASE ok
RETURN

ENDCASE # which

ENDDO # T
'
@ 11, 3 SAY '*'
DO ARHELP

CASE which = '6'
@ 13, 3 SAY '*'
ERASE
RELEASE ok
