home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hall of Fame
/
HallofFameCDROM.cdr
/
australi
/
joc009.lzh
/
JOCX.DOC
< prev
next >
Wrap
Text File
|
1990-12-07
|
10KB
|
218 lines
JOCx.DOC = John Orlay's Cataloger v.0.9-beta DOCUMENTATION
-------- ---------------------- -------------
SYNOPSIS
~~~~~~~~
JOCx.BAT is meant to assist reasonably experienced PC-user-programmers, who
keep and maintain a large collection of files.
JOCx.BAT catalogs all files present in all directories of a nominated drive.
It ignores "hidden" and/or "system" files; to include such files you must
change their "attribute"-byte.
The "x" in JOCx.BAT stands for "F" (floppy) and "H" (=hard) respectively.
JOCF.BAT catalogs floppies.
JOCH.BAT catalogs hard-drives or flopppies
The topic of when to use which, and why is explained under SYNTAX.
With prompted user-responses JOCx.BAT eventually creates an ascii file DC.DAT.
The resulting DC.DAT consists of a sequence of one-line-records.
Each line of DC.DAT has the following left adjusted fields :
cols 1 - 8 Filename
cols 9 - 12 Extension (.ext)
cols 13 - 19 Filesize (number of bytes)
cols 20 - 28 CRC32 value (blank + 4 hex bytes)
cols 29 - 35 Filedate (blank + yymmdd)
cols 36 - 47 Volumename (blank + up to 11 chars)
cols 48 - Path (blank + full path)
Thus, each one-line record in DC.DAT contains file-specific "what" and
"where" data, including the calculated CRC32 value.
With the above structure, I can foresee a variety of further uses for DC.DAT :
- With an ascii editor one could insert comments, up to 30 chars in any
line. Comment-insertion could, for instance, start at col 49 thus
pushing the infrequently needed Path-information further to the right.
- One could concatenate a sequence of DC.DAT-s (as created by JOC.BAT or
with inserted comments) to build a master-catalog which can be searched
for user specified strings.
- DC.DAT, even if not used for building a master-catalog, but just as a
temporary file, printed out for a loose-leaf binder, can be useful as
reference, against which one can compare sets of files of similar names
but possibly of different vintage or source or patching.
This specific need was my original motive for developing JOCx so as to
include CRC-values with an otherwise fairly conventional set of file-
statistics.
JOCx, in this raw beta-test version is hereby placed in the public domain, in
good faith - without any warranties or obligations - hoping for written
comments, addressed to John Orlay, C/- PC Users Group Ltd PO BOX E162
St James Sydney NSW 2000 Australia.
REQUIREMENTS
~~~~~~~~~~~~
I developed JOCx on an XT-compatible, booted from hard-disk C: under DOS 3.21.
I presume it will run on 286 or 386 machines as well under later DOS versions.
I keep the standard DOS utilities in a directory named on my PATH declaration.
I keep other relevant program-files (listed in this .DOC) in a directory named
\JOC which is NOT in the PATH, so as to avoid the risk of filename clashes.
SYNTAX
~~~~~~
Regardless of whether you intend to run JOCF.BAT or JOCH.BAT, you must be in
the directory e.g. C:\JOC which contains all JOC related program files.
- When cataloging a floppy - (without using a RAMdrive for the process) :
~~~~~~~~~~~~~~~~~~~~~~~~
The command line syntax at the DOS prompt is : JOCF dr:
For example the command JOCF A: will catalog the floppy ex drive A:
- When cataloging a hard-drive or a floppy (processing on a RAMdrive) :
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The command line syntax at the DOS prompt is : JOCH dr:
For example the command JOCH C: will catalog files ex drive C:
JOCH.BAT carries out the cataloging process on a temporary RAMdrive.
There are two subtle but serious reasons for this approach :
- it would be absurd to carry out the cataloging process (with the
creation of DC.DAT) on the very drive to be cataloged;
- one of the intermediate processes in JOCx.BAT (:TREE) would produce
garbage, unless it first looked at the root-directory of the drive to be
cataloged.
JOCH.BAT avoids these predicaments and speeds up the otherwise agonisingly
slow calculations of CRC values.
There is, however a catch.
JOCH.BAT as coded, assumes
- that all pertinent program files are in C:\JOC
- that you are in C:\JOC
- that you do not already have a RAMdrive
- that the RAMdrive to be created by JOCH can have the drivename D: .
If any one of these assumptions is wrong, then YOU will need to modify the
coding of JOCH.BAT and M-FLDATH.BAT .
The minimum necessary size of the RAMdrive itself is about 30k per 100 files.
Thus a 360k RAMdrive (created by the SETRAM D 360 line in JOCH) is fine for
cataloging a drive with up to 1000 files.
Whatever you do, you must preserve about 120k free RAM for loading and running
JOCH.BAT and the related overlayed programs.
I would expect no difficulty if your system has 640k RAM and you do not stuff
it up with memory-hungry TSR-s and shells.
PACKAGING LIST
~~~~~~~~~~~~~~
JOC009.LZH (the name of the release package created Yoshii's LHARC) contains :
ANSWER COM Defines user response as the value of env.variable %ANSWER%
ANSWER DOC (called by JOCF.BAT and by JOCH.BAT)
CHANGE COM Modifies specified strings in a specified file
CHANGE DOC (called by JOCF.BAT, JOCH.BAT, M-FLDAT.BAT, M-FLDATH.BAT)
CRC32 EXE Reports CRC32 values as per ANSI X3.66
(called by C.BAT, CH.BAT which are generated by M-CBAT.BAS or
M-CHBAT.BAS respectively)
DC BAS Generates DC.DAT from FL.DAT and CRCLOG.DAT
(called by M-FLDAT.BAT, M-FLDATH.BAT)
JOCF BAT Main program for cataloging floppies only
JOCH BAT Main program for cataloging any drive
JOCX DOC ===== this file, you are looking at it now =====
M-CBAT BAS Makes C.BAT (called by JOCF.BAT)
M-CHBAT BAS Makes CH.BAT (called by JOCH.BAT)
M-FLDAT BAT Makes DC.DAT (called by C.BAT)
M-FLDATH BAT Makes DC.DAT (called by CH.BAT
TIDYF BAT Performs housekeeping chores (called by M-FLDAT.BAT)
TIDYH BAT Performs housekeeping chores (called by M-FLDATH.BAT)
Installation Notes :
1. All *.DOC files are plain ascii (with form-feeds, but no left margin) .
They are meant to be printed, read, understood and then stored off-line.
To print them, set your printer to 3/4 inch margin, 12cpi, 6lpi,
then use the command COPY filename.DOC PRN .
2. I assume you have an on-path directory for general purpose utilities.
Copy ANSWER.COM, CHANGE.COM, CRC32.EXE to that directory .
3. All *.BAT and *.BAS files should be copied to \JOC i.e. to the directory
from which you will start JOCx and to which the eventual DC.DAT will go.
4. The standard MSDOS utilities, including GWBASIC.EXE must be on-path.
PROGRAMMING NOTES
~~~~~~~~~~~~~~~~~
These notes are included : -
- For myself, as a reminder in any further development.
- For those users who like to understand what goes on.
- For those whose machine-configuration or boot-up configuration clashes
with the assumptions, and installation requirements stated earlier in
this documentation.
All others can skip this section.
JOCF.BAT and JOCH.BAT and the chain of programs invoked by these should enable
you to start and run, without bothering about the following points :
1. The overall flow should be evident from reading a printout of the chain
of *.BAT and *.BAS files . All these files contain internal comments.
2. I avoided CALL commands, partly to allow the use of MSDOS 3.2 and up,
and partly to minimize demands on RAM capacity. This why I chained the
sequence of .BAT-s, instead of using them as subroutines.
3. In this beta version I did not compile the .BAS files; they are invoked
as a parameter of GWBASIC. There are two reasons for this. One is that
at this stage the further modifications can be more readily made and
tested in a pedesrian way. The other reason (based on trials) is that
the increase in the size of the compiled .EXE files is not justified by
any appreciable increase in overall speed. The slow step in the overall
process is not in GWBASIC, but in the calculation of CRC values, for
each and every file to be cataloged.
4. You may find M-CBAT.BAS and M-CHBAT.BAS a little unusual. Their
function is to make the very .BAT file which is then executed. This
approach, however, is the crucial solution to the problem of how to cope
with the task of specifying each and every directory present on the
drive to be cataloged, when - at the outset - one does not have any idea
about the specific directory-structure. Messy as it seems, these .BAS
files create a sequence of commands, customized to suit whatever happens
to be at that time on the drive to be cataloged.
5. The overall process (as it stands) ends with the creation of DC.DAT .
Further processing of DC.DAT, as envisaged in the previous SYNOPSIS, is
yet to be developed into a tail-end, menu-driven, add-on program.
In the mean time, through standard DOS commands, one can of course
concatenate DC.DAT into a master-catalog and do searches, sorts, or
produce reports. I will probably undertake this further development, at
least for my own use. Whether I will then publish it or not would
greatly depend on the public response to this beta version, and to the
implicit principle that a file-catalog should in each line contain all
file-specific "what" and "where" clues together with a 4-byte CRC value.