

        Deleting Extra Advanced Page Preview Screen Fonts
        While Retaining The Ones You Use Most Frequently

               Copyright 1990 by ROBERT J. SAWYER

                      CompuServe 76702,747



WordStar produces a separate screen font file (*.CRT) for each 
typestyle at each weight and point size you view with Advanced 
Page Preview.  These files add up quickly and can eat a lot of 
disk space.

WordStar International provides a utility called DELCRT.EXE on 
the Advanced Page Preview disk that will remove all *.CRT files.  
Unfortunately, I find that irritating, too.  There are some 
screen fonts that I preview constantly, and it's pointless to 
erase them if they're going to be needed again soon, especially 
since you have to wait for them to regenerate before Advanced 
Page Preview can show you a page that contains them.  

I've worked out a little system that deletes most of my *.CRT 
files, but leaves the few that I always want to have available.  
For the instructions that follow, I'm assuming you're using help 
level 3 or below; if you use help level 4, you'll find all the 
opening menu commands I refer to on the Files pulldown menu.

First, delete all existing *.CRT files AND the subdirectories 
that contain them.  The easiest way to do that is by running 
DELCRT.EXE, but you can also do it with a disk-file manager such 
as ProFinder.  If you choose the latter course, you'll find the 
subdirectories (there may be two of them) containing the *.CRT 
files immediately below your \APP Advanced Page Preview 
subdirectory.  

Next, open a document that contains the fonts you do use all the 
time.  For me, that was a letter, containing the fonts in my 
letterhead and Courier 10 PC in regular, bold, and italic.

Invoke Advanced Page Preview with ^OP.  It will generate *.CRT 
files for these fonts.

Exit Advanced Page Preview with <Esc>.  Use ^KQ to abandon the 
file you were looking at and open another file in non-document 
mode called C:\YES.  In that file, type 

                            Y<Enter>

Save and close this file with ^KD.  

Now, from WordStar's opening menu, issue L to log onto your 
Advanced Page Preview subdirectory (by default C:\WS5\APP, if you 
have WordStar 5.0 or 5.5; C:\WS\APP if you have WS6 or above).

You should see a directory entry for a subdirectory off of the 
Advanced Page Preview directory with a name such as 06050582.CRT.  
Yours will likely be different, since the number depends upon 
your video hardware and the settings in the Advanced Page Preview 
parameters file, FONTID.CTL.  Log on to that subdirectory by 
issuing L then pointing at its name and hitting <Enter>.

You'll now see a directory display that looks something like 
this:

 DIRECTORY of Drive C:\WS\APP\06050582.CRT  18M free
 ..              \   05120072.CRT  37k   31084040.CRT  26k
 31104048.CRT  33k   31112052.CRT  36k   31148080.CRT  57k

Now, select C (Protect) from the Opening Menu, and point at the 
first .CRT filename.  Hit <Enter>.  WordStar will report:

     The file is currently not protected.  Protect it? (Y/N)

Answer Y.  Repeat for each of the .CRT files.  You have now set 
the read-only attribute bit for each of these files, meaning that 
normal file delete commands will not affect them.  

Next, log on to a subdirectory that's on your DOS path statement 
(your C:\WS or C:\WS5 subdirectory should do nicely) and open a 
non-document file called CRTDEL.BAT.  Type a line like this:  

             del c:\ws\app\06050582.CRT\*.* < c:\yes

substituting the actual subdirectory used on your system.  Save 
the file with ^KD.

This is a batch file.  It tells DOS to delete every file in the 
subdirectory that contains your .CRT files.  Since DOS prompts 
you for confirmation of global deletes, we use redirection 
(indicated by the < symbol) to insert the response from the file 
named C:\YES into that prompt.  That file is the one we created 
earlier that contains the "Y" and carriage return, thus 
automatically answering "Yes" to the "Are you sure?" prompt.

Running this batch file (either from the DOS prompt, or from 
WordStar's ^KF or R DOS gateways) will delete all *.CRT and *.WSF 
files (the latter are created when previewing an InSet graphic) 
EXCEPT those that we protected from deletion above using 
WordStar's Protect command.  

Why create a batch file?  Why not just use DELCRT.EXE?  Well, 
unfortunately, DELCRT ceases to operate when it encounters a 
read-only file.

You're all finished if you have a dot-matrix or daisy-wheel 
printer.  But if you have a laser printer or DeskJet printer, 
then WordStar also lets you preview in landscape mode, and when 
so doing it creates another .CRT subdirectory.  To be able to 
eliminate the files in that directory, too, open a WordStar 
document and insert this dot command to select landscape mode:

                            .pr or=l

Now, type some text -- one character is enough.  Invoke Advanced 
Page Preview with ^OP.  Wait till the screen fonts finish 
generating, then exit Advanced Page Preview (<Esc>) and abandon 
the file (^KQ).  Log on to your \APP subdirectory.  You'll now 
see two subdirectory names in the file listing at the bottom of 
the screen.  One will be the same one you saw before; the other 
will be the one for landscape fonts (the one with the higher 
number for the filename is the landscape subdirectory).  Note 
this subdirectory name.  On my system, it's 07840582.CRT.  

Now, open the CRTDEL.BAT file in non-document mode, and add a 
second line beneath the first using this new subdirectory name:  

             del c:\ws\app\06050582.CRT\*.* < c:\yes
             del c:\ws\app\07840582.CRT\*.* < c:\yes

Save and exit with ^KX. That's it!  

Now whenever you want to free up the disk space WordStar has 
filled with .CRT files, run CRTDEL.BAT.  I actually include the 
contents of the batch file as lines within my AUTOEXEC.BAT file, 
so that every day I start with no .CRT files except the ones I 
know I'm likely to need.


------

Robert J. Sawyer is the author of the Science Fiction novel 
GOLDEN FLEECE (Warner Books, December 1990, ISBN 0-445-21078-8).
