echo "*N    *E[42m                                                                     *E[0m"
echo "    *E[42m  JR-Comm v1.0 · © 1988-90 by John P. Radigan · All Rights Reserved  *E[0m"
echo "    *E[42m  *E[32;43m « WARNING » *E[32;41m This script erases files from your WorkBench disk. *E[42m  *E[0m"
echo "    *E[42m                                                                     *E[0m"
echo "*NAnswer `yes' ONLY if you have a backup *E[4mcopy*E[0m of your"
echo "WorkBench disk in DF0: ready to be modified. Please *E[4mdon't*E[0m"
echo "change your original."
lab Begin
ask "*NAre you ready to permanently alter a copy (Y=yes, N=no)? =>"
if not warn
   echo "*NNo problem --" noline
   lab Continue
   echo " type the letter Y and press [ENTER] when"
   echo "the disk is ready, or hold the control key while you type"
   ask "the letter D and then push [ENTER] to quit this script.  =>"
   if warn
      skip back Begin
   endif
   echo "*N*NBAD ENTRY. Please" noline
   skip back Continue
endif   
echo "*N*NMoving working files to ram: to speed up script execution..."
copy c:copy ram:
cd ram:
copy c:echo ""
copy c:rename ""
copy c:cd ""
copy c:delete ""
copy c:if ""
copy c:else ""
copy c:endif ""
path add ""
cd df0:
echo "Removing unnecessary files from root directory."
if exists Clock
   delete Clock
   if exists Clock.info
      delete Clock.info
   endif
endif
if exists Shell
   delete Shell
   if exists Shell.info
      delete Shell.info
   endif
endif
if exists LICENSE
   delete LICENSE
   if exists LICENSE.info
      delete LICENSE.info
   endif
endif
if exists ReadMe
   delete ReadMe
   if exists ReadMe.info
      delete ReadMe.info
   endif
endif
if exists c
   echo "Removing unnecessary files from subdirectory 'c'."
   cd c
   if exists DiskDoctor
      delete DiskDoctor
   endif
   if exists Edit
      delete Edit
   endif
   if exists Search
      delete Search
   endif
   if exists Sort
      delete Sort
   endif
   if exists Binddrivers
      delete Binddrivers
   endif
   if exists Break
      delete Break
   endif
   if exists ChangeTaskPri
      delete ChangeTaskPri
   endif
   if exists DiskChange
      delete DiskChange
   endif
   if exists Eval
      delete Eval
   endif
   if exists Fault
      delete Fault
   endif
   if exists FileNote
      delete FileNote
   endif
   if exists Install
      delete Install
   endif
   if exists Join
      delete Join
   endif
   if exists Lock
      delete Lock
   endif
   if exists NewShell
      delete NewShell
   endif
   if exists Prompt
      delete Prompt
   endif
   if exists Protect
      delete Protect
   endif
   if exists Status
      delete Status
   endif
   if exists Version
      delete Version
   endif
   if exists Which
      delete Which
   endif
   if exists Why
      delete Why
   endif
   if exists IconX
      delete IconX
   endif
endif
cd df0:
if exists System
   echo "Removing unnecessary files from subdirectory 'System'."
   cd System
   if exists IconEd
      delete IconEd
      if exists IconEd.info
         delete IconEd.info
      endif
   endif
   if exists Say
      delete Say
      if exists Say.info
         delete Say.info
      endif
   endif
   if exists FixFonts
      delete FixFonts
      if exists FixFonts.info
         delete FixFonts.info
      endif
   endif
   if exists MergeMem
      delete MergeMem
      if exists MergeMem.info
         delete MergeMem.info
      endif
   endif
   if exists NoFastMem
      delete NoFastMem
      if exists NoFastMem.info
         delete NoFastMem.info
      endif
   endif
   if exists InitPrinter
      delete InitPrinter
      if exists InitPrinter.info
         delete InitPrinter.info
      endif
   endif
endif
cd df0:
if exists l
   cd l
   echo "Removing unnecessary files from subdirectory 'l'."
   if exists Speak-Handler
      delete Speak-Handler
   endif
endif
cd df0:
if exists devs
   cd devs
   echo "Removing unnecessary files from subdirectory 'devs'."
   delete printers/#? quiet
   if exists narrator.device
      delete narrator.device
   endif
endif
cd df0:
if exists s
   cd s
   echo "Removing unnecessary files from subdirectory 's'."
   if exists CLI-Startup
      delete CLI-Startup
   endif
   if exists Startup-Sequence
      rename Startup-Sequence Startup-Sequence.bak
   endif
   if exists DPAT
      delete DPAT
   endif
   if exists PCD
      delete PCD
   endif
   if exists Shell-Startup
      delete Shell-Startup
   endif
   if exists SPAT
      delete SPAT
   endif
   if exists Startup-Sequence.HD
      delete Startup-Sequence.HD
   endif
endif
cd df0:
if exists fonts
   cd fonts
   echo "Removing unnecessary files from subdirectory 'fonts'."
   delete #? all quiet
endif
cd df0:
if exists libs
   cd libs
   echo "Removing unnecessary files from subdirectory 'libs'."
   if exists translator.library
      delete translator.library
   endif
   if exists mathieeedoubbas.library
      delete mathieeedoubbas.library
   endif
   if exists mathieeedoubtrans.library
      delete mathieeedoubtrans.library
   endif
   if exists mathtrans.library
      delete mathtrans.library
   endif
endif
cd df0:
if exists Utilities
   cd Utilities
   echo "Removing unnecessary files from subdirectory 'Utilities'."
   if exists Calculator
      delete Calculator
      if exists Calculator.info
         delete Calculator.info
      endif
   endif
   if exists Clock
      delete Clock
      if exists Clock.info
         delete Clock.info
      endif
   endif
   if exists ClockPtr
      delete ClockPtr
      if exists ClockPtr.info
         delete ClockPtr.info
      endif
   endif
   if exists Notepad
      delete Notepad
      if exists Notepad.info
         delete Notepad.info
      endif
   endif
   if exists Say
      delete Say
      if exists Say.info
         delete Say.info
      endif
   endif
endif
cd df0:
if exists Prefs
   cd Prefs
   echo "Removing unnecessary files from subdirectory 'Prefs'."
   if exists CopyPrefs
      delete CopyPrefs
      if exists CopyPrefs.info
         delete CopyPrefs.info
      endif
   endif
endif
cd df0:
if exists Empty
   echo "Removing subdirectory 'Empty'."
   if exists Empty.info
      delete Empty.info
   endif
   delete Empty all quiet
endif
if exists Expansion
   echo "Removing subdirectory 'Expansion'."
   if exists Expansion.info
      delete Expansion.info
   endif
   delete Expansion all quiet
endif
if exists Demos
   echo "Removing subdirectory 'Demos'."
   if exists Demos.info
      delete Demos.info
   endif
   delete Demos all quiet
endif
ram:lharc -m -x e ram:fonts df0:fonts/
copy ram:JR-Com#? df0:
copy ram:JR-Edi#? df0:
echo >df0:s/Startup-Sequence "LoadWB"
echo >>df0:s/Startup-Sequence "EndCLI >NIL:"
sys:
echo "*N*NDone."

