;Prefs backup script - Martyn - 5th March '97. ;---------------------------------------------- ;Setfont makes the system use a different font for the output window. ;SETFONT XEN.font 11 ;This is the title text line. Echo " " Echo "This script will backup your S: and ENV: files to a floppy disk." Echo " " ;Here the user is asked a question, only if Y is pressed will the script continue. ASK "Do you wish to continue? (Press Y/N then )" IF WARN ; If Y is pressed. Echo " " Echo " " Echo "O.K. Lets go! Please insert a blank disk into DF0:" Echo " " ELSE ; If N is pressed. SKIP AbortBit ; Go to a sub=routine called "AbortBit" (indicated by a LAB statement.) ENDIF ; This section will check for a disk and offer to format it. IF NOT EXISTS DF0: SKIP DiskNotFound ; Go to a sub-routine called "DiskNotFound" (indicated by a LAB statement.) ELSE ; If there is a disk in DF0: do this: Echo " " ASK "Should I full format the disk? (Press Y/N then )" IF WARN ; If Y is pressed. Echo " " Echo "Full formatting the disk now..." Echo " " FORMAT DRIVE DF0: NAME PrefsBackup NOICONS SKIP Ready ELSE ; If N is pressed. Echo " " ASK "Should I quick format the disk? ( Press Y/N then )" IF WARN ; If Y is pressed. Echo " " Echo "Quick formatting the disk now..." Echo " " FORMAT DRIVE DF0: NAME PrefsBackup NOICONS QUICK SKIP Ready ELSE ; If N is pressed. SKIP Ready ENDIF ENDIF ENDIF ;Asks user for conformation to continue. LAB Ready Echo " " ASK "Ready and O.K. to backup? (Press Y/N then )" IF WARN ; If Y is pressed. Echo " " Echo "O.K." SKIP BackupBit ELSE ; If N is pressed. SKIP AbortBit ; Go to a sub=routine called "AbortBit" (indicated by a LAB statement.) ENDIF ; This is the backup part of the script. LAB BackupBit ;Backup ENV: section IF EXISTS DF0:ENV_Backup DELETE DF0:ENV_Backup QUIET ENDIF Echo " " Echo "Copying ENV: to Df0: ENV_Backup..." Echo " " DF0: MAKEDIR ENV_Backup COPY ENV:SYS/Def_Drawer.info TO DF0:ENV_Backup.info QUIET NOREQ COPY ENV: TO DF0:ENV_Backup ALL QUIET NOREQ WAIT 1 Echo " " Echo "ENV: done (Approx 40% complete.)" Echo " " ;Backup S: section. IF EXISTS DF0:S_Backup DELETE DF0:S_Backup QUIET ENDIF Echo " " Echo "Copying S: to Df0: S_Backup..." Echo " " DF0: MAKEDIR S_Backup COPY SYS:S.info TO DF0:S_Backup.info QUIET NOREQ COPY S: TO DF0:S_Backup ALL QUIET NOREQ WAIT 3 Echo " " Echo "S: done (100% complete.)" Echo " " SKIP QuitBit LAB DiskNotFound Echo " " Echo "No disk in drive Df0:, aborting." SKIP AbortBit LAB AbortBit Echo " " Echo "Backup was user aborted!" Echo " " ASK "Press to quit." Echo " " Echo " " Echo "Script by Martyn Bampton - Mar 97." QUIT LAB QuitBit Echo " " ASK "All done, press to quit." Echo " " Echo " " Echo "Script by Martyn Bampton - Mar 97."