.key dest,Flag/k
.bra {
.ket }
.def dest SYS
failat 21
;
; CopyData2.bat
;

lab StartData2
   type 'Copy24Pin.txt
   ask -dY " Copy Screen Fonts for 24 pin printer? Y"
   if warn                   ; no, Skip to end
      skip END
   endif                     ; yes, Check for 24pinFont Disk

lab InsertData2
   assign >nil: Data2: exists        ; check if they put disk in
   if warn                                ; No Disk, Ask for it
      echo "*N Please insert Data2 Disk and press Return to continue"
      ask  -dy " or type N and Return to cancel copying of 24 pin printer fonts "

         ; if typed "n" then don't copy fonts, go to END
         ;
         ; if typed "y" or return then check for disk
         ; if disk not found then ask again
         ; if disk is found then skip to CopyToWhere

      if  warn                            ; no, don't copy the fonts
         skip END
      endif                               ; Yes, do copy Data2
         skip InsertData2 BACK            ; go back and check for disk again
   endif

lab 24Font
if {dest} eq "SYS"
   echo "*Ec*N Where shall I put the Screen Fonts for 24 pin printers?"
   echo "*N -->1) FONTS:"
   echo "*N    2) SYS:24pinFonts"
   echo "*N    3) SYS:CityDesk/24pinFonts"
   echo "*N    4) I was only joking, I really don't want to copy 24 pin fonts"
   echo "*N Please choose an option by typing its number. Then press Return ?" NOLINE
   setenv >NIL: Choice{$$} ?
      if $Choice{$$} EQ 4 VAL
         Skip 6 
      endif
         skip Eval_Choice{$$}
else
   echo "*Ec Where shall I put the Screen Fonts for 24 pin printers?"
   echo "*N -->1) FONTS:"
   echo "*N    2) SYS:24pinFonts"
   echo "*N    3) SYS:CityDesk/24pinFonts"
   echo "*N    4) {dest}:24pinFonts"
   echo "*N    5) {dest}:CityDesk/24pinFonts"
   echo "*N    6) I was only joking, I really don't want to copy 24 pin fonts"
   echo "*N Please choose an option by typing its number. Then press Return ?" NOLINE
   setenv >NIL: Choice{$$} ?

lab eval_Choice{$$}
   if $Choice{$$} EQ 1 VAL                ; Copy 24pin fonts to fonts:
      assign >nil: fonts: exists          ; Check to make sure that Fonts: is assigned
      if warn
         echo "*NFonts: is not assigned*NPlease pick again"
         skip 24Font BACK
      endif
      assign Whereto: fonts:
      echo "*NCopying 24 pin printer fonts to Fonts:..." NOLINE
      skip Copy_Files
   endif

   if $Choice{$$} EQ 2 VAL                ; Copy 24pin fonts to SYS:24pinFonts
      if not exists SYS:24pinFonts
         makedir SYS:24pinFonts
         copy cdbat:drawer.icon to SYS:24pinFonts.info CLONE QUIET
         echo "*NDirectory SYS:24pinFonts created" NOLINE
      endif
      assign Whereto: sys:24pinFonts
      echo "*NCopying 24 pin printer fonts to SYS:24pinFonts..." NOLINE
      skip Copy_Files
   endif

   if $Choice{$$} EQ 3 VAL                ; Copy 24pin fonts to SYS:CityDesk/24pinFonts
      if not exists SYS:CityDesk
         makedir SYS:CityDesk
         copy cdbat:drawer.icon to SYS:CityDesk.info CLONE QUIET
      endif
      if not exists SYS:CityDesk/24pinFonts
         makedir SYS:CityDesk/24pinFonts
         copy cdbat:drawer.icon to SYS:CityDesk/24pinFonts.info CLONE QUIET
         echo "*NDirectory SYS:CityDesk/24pinFonts created" NOLINE
      endif
      assign Whereto: SYS:CityDesk/24pinFonts
      echo "*NCopying 24 pin printer fonts to SYS:CityDesk/24pinFonts..." NOLINE
      skip Copy_Files
   endif

   if $Choice{$$} EQ 4 VAL                 ; Copy 24pin fonts to {dest}:24pinFonts
      if not exists {dest}:24pinFonts
         makedir {dest}:24pinFonts
         copy cdbat:drawer.icon to {dest}:24pinFonts.info CLONE QUIET
         echo "*NDirectory {dest}:24pinFonts created" NOLINE
      endif
      assign Whereto: {dest}:24pinFonts
      echo "*NCopying 24 pin printer fonts to {dest}:24pinFonts..." NOLINE
      skip Copy_Files
   endif

   if $Choice{$$} EQ 5 VAL                ; Copy 24pin fonts to {dest}:CityDesk/24pinFonts
      if not exists {dest}:CityDesk
         makedir {dest}:CityDesk
         copy cdbat:drawer.icon to {dest}:CityDesk.info CLONE QUIET
      endif
      if not exists {dest}:CityDesk/24pinFonts
         makedir {dest}:CityDesk/24pinFonts
         copy cdbat:drawer.icon to {dest}:CityDesk/24pinFonts.info CLONE QUIET
         echo "*NDirectory {dest}:CityDesk/24pinFonts created" NOLINE
      endif
      assign Whereto: {dest}:CityDesk/24pinFonts
      echo "*NCopying 24 pin printer fonts to {dest}:CityDesk/24pinFonts..." NOLINE
      skip Copy_Files
   endif

   if $Choice{$$} EQ 6 VAL               ; Abort Copy
   lab 6
      Echo "*NOk, I won't copy the Screen fonts for 24 pin printers"
      Skip End
   endif


   ; They typed in something other than the 1-6or 1-10
   if {dest} EQ "SYS"
      echo "*N You must type in a number between 1 and 6"
   else
      echo "*N You must type in a number between 1 and 10"
   endif
      wait 1
      skip 24Font BACK

lab Copy_Files
 ;skip debug
   copy Data2:24pinFonts                  to WhereTo: ALL CLONE QUIET
 lab Debug
   echo "*N*N All 24 pin printer fonts have been copied"
skip End


lab End
   echo "*NPlease wait for Menu..." NOLINE
