EXFIND10.LBR 20-May-90 Extract As Sysop of the BlackBoard, I have over the years collected more than one hundred disks of uploaded files. Many of these are probably duplicates as once every month I archive all new uploads without taking the extra time to check whether or not the new files already exist in the offline catalog. If it were possible, even with a 40 Megabyte hard disk, to keep everything online at any one time ZMD would refuse to accept duplicate uploads. Enter EXFIND. Used in conjunction with a ZCPR alias script, EXFIND searches my offline catalog and reports the existance, or non-existance of requested files via the ZCPR registers. Thus, used as an extention to ZMD, existing files are not accepted as uploads. ------ EXFIND is a Z-System utility. Its sole output is through the ZCPR registers, where it reports success, or failure of the search; or optionally the number of hits. Two patch areas exist near the beginning of the program. These are clearly labelled. "SIZREC>" which is set to 12 characters. This determines the maximum number of characters to compare. Thus the catalog can contain, as in my case, a key which determines the application of the file, and a one line description of the file. "FILE>" which is the default file to search. The default file nay be overridden from the command line. Currently the default is OFFLINE.DIR. Change these to suit your application. The form of the command is: EXFIND [DIR:][FILENAME.EXT][=mask][/o] where "mask" is the filename or word to search for. A single optional parameter, "c", causes EXFIND to report the number of matches in registers 0 and 1, the least significant count in register 0 and the most significant in register 1. By default, EXFIND returns either 0 for no match or 1 for a match in register 0. In this case, the search is terminated on the first match (It is assumed that the file has been sorted alphanumericly). Lines with leading spaces or tabs are ignored, allowing for the file being commented. The Alias Script ZMD IF $1=R;ECHO P%>LEASE WAIT... ;EXFIND A0: =$2;IF 0 0; ZMD150 $*;ELSE;type a0:m ex;FI;ELSE;ZMD150 $* ;ZIF ZMD.COM has been renamed to ZMD150.COM and made "system" so as not to appear in the normal directory display. The file "ex" contained in M.LBR is typed on the console when a match is found to explain to the user that the file he is attempting to upload already exists and that he should possibly select another file. Sample OFFLINE.DIR extract [Colume 1] | | **************************************************************************** * Blackboard WhatsFor Offline Catalog * * Last Update: 28/04/90 * **************************************************************************** * * * KEY: * * [APPLE] - Apple Computers - All configurations * * [ATARI] - Specifically for Atari Computers * * [BASIC] - Basic Source File * * [CMDR] - Specifically for Comodore 64/128/Amiga * * [CP/M] - Runs under generic CP/M and Enhancements * * [DBASE] - dBase II or III program * * [MODULA] - Turbo Modula 2 Application * * [MS-DOS] - Runs only under MS-DOS/PC-DOS and equivelents. * * [PASCAL] - Turbo Pascal Source (mainly) * * [TEXT] - Text file * * [ZCPR3] - Specifically for ZCPR 3.0 and above * * [ZCPR33] - Specifically for ZCPR 3.3 and above * * [ZCPR34] - Specifically for ZCPR 3.4 and above * * * **************************************************************************** [2] 22DSK121.ARC [MS-DOS] Reads/Writes multiple disk formats under 22NICE 22NICE12.ARC [MS-DOS] CP/M Emulator for MS-DOS 2DOCWHO.ARC [TEXT] Two Doctor Who stories. Obtained from GENIE SciFi. . . . [A] ACREATE3.LBR [ZCPR3] Creates Alias files from text files AD.OBJ [MS-DOS] Sorted Directory ADDRSS.ARC [MS-DOS] Address Book Database ADIR26.LBR [ZCPR3] Alias Directory. Implements search mask. . . . [Y] YAHTZEE.BAS [ATARI] Play against 4 other people, or let the computer play YESMAN.LBR [CP/M] Your own personal yesman [Z] Z-GOLF.LBR [ZCPR3] Game of Solitare Z-NEWS.1Z9 [ZCPR3] Newsletter Z-NEWS.2Z1 [ZCPR3] Newsletter Z-NEWS.2Z2 [ZCPR3] Newsletter Z-NEWS.4Z2 [ZCPR3] Newsletter Z-NEWS.8Z9 [ZCPR3] Newsletter Z-NEWS5.LBR [ZCPR3] Newsletter Z3-OZ-56.LBR [ZCPR3] ZCPR3 Osborne 56K implementation Z33ERR07.LBR [ZCPR33] ZCPR33 Error processor Please address comments and/or suggestions to: Greg Miner PO Box 232 Port Williams, N.S. B0P 1T0 Phone: (902)-542-7259 BBS: (902)-542-5284