16K disk
by Bert Williams and Tom Hamel
Anybody who owns and uses a disk drive quickly accumulates many diskettes loaded with various programs and utilities. It is not uncommon to wonder what files are on a particular diskette or on what diskette(s) a particular file can be found. CATALOG.BAS (see listing) creates a listed file (FILENAME.LST) that stores the above information for later retrieval, again by running CATALOG.BAS. The program is selfprompting and quite friendly. Simply type in listing #1 and save it with SAVE "D:CATALOG.BAS" or whatever file name you wish to use.
A. Creating FILENAME.LST.
Run CATALOG.BAS and select from the main menu option "1 FILE MAKER." Number the
diskettes you wish to catalog using numbers from 1 to 726. You need not number
the diskettes consecutively and you can catalog the diskettes in any order. When
prompted, press "1 IF NEW FILE," place a numbered diskette in drive one, and
press RETURN. CATALOG.BAS reads the disk directory and creates data statements
with the information in the directory. Continue until all diskettes have been
cataloged. Pressing 'O' will list FILENAME.LST to the disk in drive one. But
first, be sure the diskette in drive one is the diskette you wish to write this
file to.
B. Updating FILENAME.LST.
This is the same as A above except that when prompted you place the disk with
FILENAME. LST in D1 then press "2 IF UP-DATE. " You may update with a diskette
number that has or has not been previously cataloged. Note: You can catalog
diskettes that do not have a directory by interrupting the program with the
BREAK key and adding the data statements as needed. For diskette n, data
statements are created at lines 1000+40*n, 1000+40*n+2, etc., as needed. Study
the data statements created by the program (lines 1040-30100) to see the format
needed. If data statements are user created you still must go through the
file-maker-update options to get this information written to FILENAME.LST on the
disk.
C. Finding a File
Run CATALOG.BAS and select from the main menu option "2 File Finder." From the
file search menu select the "I File Name" option and then indicate the name of
the file you want to find. All occurrences, if there are any, of the indicated
file will be listed on the screen. Wild cards will not work with this option.
D. Listing the Contents of a Disk
From the file search menu select the "2 Disk Number" option and input the number
of the disk you want searched. All files on this disk and sectors used/free
information will be listed.
E. List of Cataloged Disks
Option "3 Cataloged Disks" of the file search menu lists all the disks that you
have cataloged. This could be useful before using the "2 Disk Number" option.
Errors have not been trapped within the program so it is possible to cause the program to abort by inputting a wrong data type. Also, the break key can be used to stop execution since it has not been disabled. Should you unintentionally cause the program to abort simply run the program again and continue as before. The program and data statements created should still be in the computer.
Following is a description of the major components of the program listing as referenced by line numbers.
10-25: | Initialize variables |
30-65: | Heading |
70: | Dimension strings |
75-110: | Main menu options |
115-125: | Enter FILENAME.LST if not already in machine |
130-160: | File Search menu |
165-305: | File and disk searching procedure |
310-335: | File Maker menu options |
340-495, | Creates or updates and writes |
530-550: | FILENAME.LST to disk |
500-525: | Headings for file maker/file finder menus |
555-635: | Various subroutines used in above procedures |