home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
CPM
/
UTILS
/
DIRUTL
/
SRTDIR31.LBR
/
SRTDIR31.DQC
/
SRTDIR31.DOC
Wrap
Text File
|
2000-06-30
|
5KB
|
98 lines
SRTDIR31
Alpha One Micro-Consulting, Ltd.
Modified by: Don A. Williams November 24,1984
Arizona Kaypro Users' Group (AKUG)
SRTDIR was originally SORTDIR included in the NEWARC.LBR file.
It appears to be another program by Dave Rand although his name
does not appear anywhere in the program. The only identification
in the program is the "Alpha One Micro-Consulting, Ltd." byline.
The program, like all of those in NEWARC.LBR, does not appear to
be copyrighted since there is no copyright statement in the
object code. The name was changed to SRTDIR to allow for
inclusion of a version and release code; the original version in
NEWARC was Version 3.0 so I called this minor revision 3.1.
SRTDIR is a functional replacement for SAP and performs the same
basic functions; i.e. it sorts a directory in to alphabetic order
and writes it back out to the disk. This sorting not only makes
the directory easier to handle with facilities such as DU and
DIR, but, since it collects all of the extents of large files
into a contiguous area in the directory, makes handling of these
larger files by almost any facility considerably faster.
SRTDIR also provides some useful statistics on disk utilization
that I like.
The original SORTDIR required specification of the disk to be
processed and did nothing more than sort the directory. SRTDIR31
will process the current disk if none is specified and provides
the option of eliminating erased files from the directory for
security. I frequently make copies of disks for other people and
these copies might contain erased versions of proprietary
programs or other programs that I do not want to put into general
circulation. Purging the directory entries for erased files
(filling the entry with E5Hs) makes recovery of these erased file
difficult for even the most persistent 'hacker'.
Use of SRTDIR is simple. If you wish to sort the directory of
the current disk:
A>SRTDIR
will do the job ('A>' stands for CP/M's normal prompt and, in
this example, indicates that disk A is the current disk.)
If you wish to sort the directory of some disk other than the
current disk, simply indicate the disk that you wish to sort on
the SRTDIR command line in the usual CP/M fashion as follows:
A>SRTDIR B:
This example would sort the directory of the disk on drive B even
though the current disk is A. SRTDIR will NOT reset the disk
drives so be sure to do a Control-C before using it if you have
changed disks. It does return to CP/M with a Warm Boot so that
the disks will not be Read Only when it is through.
The distributed version of SRTDIR3.1 is set to purge erased files
by default. This operation can be modified in either of two
ways. At location 103H in SRTDIR is a byte that controls the
action to be taken for erased files. If this byte is zero, no
action will be taken; i.e. the files will remain in the directory
as erased. If this byte is non-zero (usually 0FFH,) the entries
for all erased files will be purged (filled with 0E5Hs.) To
change the default action of SRTDIR, uses DDT, SID, ZSID, etc. to
change the contents of the byte at 103H.
To override the default action of SRTDIR for occasional use,
SRTDIR provides a Command Line option as follows:
A>SRTDIR B:$E
The $E switch on the command line will REVERSE the operation of
the default setting. In the distributed version of SRTDIR31, the
previous command will NOT purge the erased files. If you have
changed the byte at 103H in SRTDIR to a zero (default to no
purge,) the previous command would cause the erased files to be
purged.
Since Dave Rand did not release the source for SORTDIR, I do not
feel that I can release the source for SRTDIR. However, since it
is a small, clean program, it can be disassembled using any of
the Christensen disassemblers (RESOURCE, ZSOURCE, ZDASM, etc.) in
relatively short time. My source for SRTDIR was obtained this
way using a very old version of RESOURCE.
Possible future revisions of this program would include an
optional facility to purge zero length files (with the optional
exception of those beginning with a '-'; the usual indication of
a volume label for the cataloging systems.)
Don A. Williams
Arizona Kaypro Users' Group (AKUG)