====================================================================== Tony Lindsey 3752 Third Avenue San Diego, CA 92103-4112 Voice communications ONLY: (619) 295-2922 ====================================================================== INTRODUCTION This is a quick and VERY snappy way to search through and maintain the XFERLIST file that can be downloaded from Gene's bulletin board in Chicago, and we only need to use the Disk Operating System to do it! The XFERLIST file contains many lines of information, each describing a file that can be downloaded onto our computers. This listing can EASILY overwhelm us, because it contains so much information in so many lines. There were almost 2,000 files listed as of December 1985. Here are some examples: DSM206.LBR -11-09-85 LATEST DOS-O-MATIC VERSION 2.06 (ID1590) 92288 BLAKBOOK.ARC -11-09-85 ADDRESS BOOK PGM IN TURBO, PRINTS (ID1648) 80128 HDPREP.ARC -11-07-85 HARD DISK PREPARATION UTILITIES (ID0178) 63104 MPMPRN3.LBR -11-07-85 IBM CHARACTER SET FOR EPSON PRINTERS (ID0178) 68864 DISKDRIVE -11-03-85 360K DISK DRIVE UPGRADE FOR AT & 286 (ID0270) 1325 XFRDB2.ARC -10-20-85 MAINTAIN GENE'S XFERLIST W/DBASEII (ID1580) 14336 CAROLS.EXE -10-20-85 MENU SELECTION OF 24 CHRISTMAS SONGS (ID0547) 41216 FIND-SAT.BAS -10-03-85 FIND SATELLITE COORDS FOR 17 CITIES (ID0284) 18944 DIRS.ARC -09-30-85 TOTAL FILE SPACE USED IN SUBDIR (ID0012) 17664 ESIE.LBR -09-29-85 AN EXPERT SYSTEM SHELL (ID0090) 117888 Every line must pack a lot of information: CAROLS.EXE -10-20-85 MENU SELECTION OF 24 CHRISTMAS SONGS (ID0547) 41216       ³ ³ ÀÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ³ ³ ³ ³ ³ Who sent the file to Gene ÄÄÄÄÄÙ ³ ³ ³ ³ The file's size ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ³ ³ ÀÄ The file's 36-character description ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄ The date it was sent to the bulletin board ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ The file name and extension WHY THE LOOK4 PROCEDURE IS NECESSARY Looking for one or two files in the midst of all of this information can be a drag. If you print out the WHOLE file, it can take a LOT of time, trying to read it in any form can give you a headache, and you'll be lucky if you retain ANY of it! Some people have set up database manager programs to search through and add to this list using dBASE II and III and other database managers. I personally find this to be slow. Instead, I use common DOS 3.10 commands (plus one minor freeware file and several text files) to search through and maintain the XFERLIST file. WHAT RESULTS YOU CAN EXPECT Once everything is all set up, all you'll have to do is to start up your computer using a particular diskette, and then decide what you'd like to look for. For example, if you've just bought the program called "Managing Your Money", you might want to look for every occurrence of "MYM" within the XFERLIST file, so you can download anything that appeals to you. You could then issue the following command: LOOK4 MYM Using a RAM-Disk, this has yielded me the following result on my screen in slightly less than 9 seconds: MYM_ALL.UNP -09-19-85 UNPROTECT MYM - ALL REVS (ID1516)5 3584 MYMFIX.ARC -08-25-85 UNPRO. MAN. YR. MONEY W/O PRG. MODS (ID0094)5 1792 MYM.HRD -05-29-85 RUN MYM FROM A HARD DISK (ID1659)5 2176 You can see how "MYM" is contained within each line. Once again, this procedure located and displayed 3 lines within a file containing 147,456 characters in 8.89 seconds! I get the same result in 14.68 seconds using a 10 megabyte hard disk. I doubt that a database manager would be so quick! If I desire the same result, only printed out on my printer, I can use this variation: LOOK4 MYM P THE LESSONS: I will be explaining the quicker, RAM-Disk method of finding data first, then the plainer, slower hard-disk method, then I will explain how to keep your XFERLIST data file current. ======================================================================== IF YOU WOULD LIKE TO USE THE LOOK4 PROCEDURE ON A RAM-DISK. Here's what you'll need: REQUIREMENTS: ================== - DOS 3.00 or 3.10 - 512k or 640k of RAM - A formatted, bootable floppy diskette created with the FORMAT A:/S command. We'll call this the LOOK4 diskette, and it should contain ALL of the following files: Standard DOS files ================== VDISK.SYS FIND.EXE MORE.COM Plus the following files which SHOULD be included with this file: ================== FLIP.COM AUTOEXEC.BAT CONFIG.SYS LOOK4.BAT And, finally, the main file with all of the data. ================== XFERLIST Once you have all of the files on the diskette, it SHOULD work right away by re-starting your computer with that diskette. But, with life the way it is, maybe I should explain what everything does, so you can trouble-shoot. VDISK.SYS The standard DOS-approved way of creating a RAM-disk using most of your computer's 512k or 640k of RAM. THIS WILL NOT BE A PROBLEM! You won't be using your computer for ANYTHING ELSE but SEARCHING FOR DATA whenever you use the LOOK4 diskette. FIND.EXE A seldom-used DOS "filter" that searches through files for whatever string of characters you specify. MORE.COM Another DOS filter, which provides a way of preventing lots of data from scrolling right off the screen before we get to see it. FLIP.COM An old freeware utility that works well in a small amount of space. I use it with the LOOK4 routine to automatically "press" the CapsLock key for me. Here are all of the proper ways you can use it in a batch file: FLIP CAPS ON FLIP CAPS OFF FLIP NUM ON FLIP NUM OFF FLIP MONO FLIP COLOR 80 FLIP COLOR 40 THE CONFIG.SYS FILE. This is a file we humans create, containing a collection of special commands. These commands are NOT commands that you normally can type in at the DOS prompt. The CONFIG.SYS file is an "obedience trainer" for your computer, and it's shocking how few people know the value of it. The file called CONFIG.SYS is read by the computer just before AUTOEXEC.BAT, and has a different reason for existence. When you start up your computer, the Disk Operating System is loaded into memory. It then looks for a file called CONFIG.SYS on the start-up disk. If the file exists, then DOS performs the commands that we human beings have set up for it. After that, the AUTOEXEC.BAT kicks in. You can study the technical aspects of the CONFIG.SYS file in greater detail in your DOS manual's Configuration Commands section. Here's what CONFIG.SYS on the LOOK4 diskette should look like: BREAK=ON BUFFERS=8 files=28 device=vdisk.sys 400 Here are the explanations: BREAK=ON means that we want to reserve the right to panic and break out of problems we might be experiencing. Normally, we can tell the computer to "WHOA" by holding down the CTRL KEY and briefly pressing the SCROLL LOCK or BREAK key on the upper right corner of the keyboard. (See the word "Break" on the front of the key?) This procedure will still work, but now we've told the computer to pay EXTRA-attention to our desire to break out of what's going on. BUFFERS=8 is a great way to speed up your computer's disk accessing. According to the great Peter Norton, the best number of BUFFERS to assign depend on the type of disk drive you use the most. If you only use floppy diskettes, you should set the number of BUFFERS to 8. If you use an IBM PC XT with a 10-megabyte hard disk, set your BUFFERS to 16. If you use an IBM AT or a Compaq Deskpro with a 20-megabyte hard disk, set your BUFFERS to 32. I'm only guessing, but it seems like the progression is 16 BUFFERS to each 10 megabytes. Since we're using the LOOK4 diskette as an entity unto itself, let's leave this line alone. FILES=28 means that we want to give DOS the ability to "juggle" up to 28 files in memory at once if necessary. This can include memory-resident utilities like Sidekick, Applications software like Symphony or Framework, Symphony's Tutorial Application, the Lotus Access Menu, and any other such goodies we might use during a typical day's work. I've found that 28 is a good number, though there's no real upper limit to the number you can specify. Each additional file you add takes up 39 more bytes of RAM memory. The FILES statement can be especially nice for all of the Symphony or Framework or dBASE III users who have discovered problems when combining their application software with various memory-resident programs like the Pop-Up series and SideKick. You might have noticed that the computer would inexplicably lock up when you'd have many of these programs in memory. Being logical and intelligent, you'd stop using these auxiliary programs. A PROPERLY set-up FILES statement in the CONFIG.SYS file may clear up your woes! This is advice that might just cause you to welcome Sidekick and all of the others back into daily use. DEVICE=VDISK.SYS 400 is THE most important line in the CONFIG.SYS file. It says that DOS should create a new device using the information stored in the file called VDISK.SYS. This information fools DOS into thinking that it has a new disk drive, which in MY case on MY machine will automatically be called drive D:, since I'm already using drives A: through C:. This "Electronic Disk", "RAM-Disk", "E-Drive", or whatever you want to call it, is actually the main part of your computer's RAM memory, set up to act just like a disk drive. The normal, default size of this RAM-Disk is only 360k, which is NOT enough for the XFERLIST file and the temporary files created by the FIND and MORE filters. So, we give the RAM-Disk a size of 400k. THE AUTOEXEC.BAT FILE. Each time you start up the computer, the Disk Operating System (DOS) looks for a "batch" file called AUTOEXEC.BAT, containing as many or as few commands as we desire. DOS then follows these commands, one by one. Here's what AUTOEXEC.BAT on the LOOK4 diskette should look like: echo off cls d: A:flip caps on copy A:LOOK4.BAT copy a:XFERLIST copy a:FIND.EXE copy a:MORE.COM cls echo To use the LOOK4 batch file properly, first decide what string you echo want to search for. For example: you might want to find every occurrence of echo the characters "DB3", because you have a sudden interest in dBASE III. echo So, you issue the following command and press enter: echo LOOK4 DB3 echo If you want the same output, only you want it to be printed out, try echo LOOK4 DB3 P Again, I'll explain the new concepts: ECHO OFF is used as first line of EVERY batch file, and normally nowhere else. It means we don't want the following commands flashed on the screen in a confusing way, so "zip your lip, computer!" CLS means "clear the screen". The second command for EVERY batch file. D: means that DOS should pay attention to drive D: from now on. (Remember, D: refers to the RAM-Disk.) This tells DOS that you want to "change the default drive", meaning that all of your previous commands might conceivably have been taking it for granted that drive A: was the important one, and now drive D: is going to be the important one. It is CRUCIAL that this line have an accurate drive specifier that will work properly on YOUR machine. Like I said earlier, the CONFIG.SYS file automatically loads the RAM-Disk as drive D:, but it might be drive C: or E: or F: or WHATEVER on your machine. This line is the one to modify if you have any problems. A:FLIP CAPS ON automatically hits the CapsLock key for us, turning it on. This is the ONLY time we use the FLIP command. COPY A:LOOK4.BAT COPY A:etc. copies the 4 important files onto the RAM-Disk. ECHO To use etc. means that it's okay to temporarily step out of the "zip your lip" mode, just to put a message on the screen. THE LOOK4.BAT BATCH FILE. Here's what it should look like: echo off CLS IF '%2' == 'P' GOTO PRINT type xferlist | find "%1" >output.fil type output.fil | more GOTO END :PRINT type xferlist | find "%1" >PRN :END Here's the explanation of the new concepts in this file: IF '%2' == 'P' GOTO PRINT is a standard but poorly documented way of testing to see if you typed in a 'P' after the normal two words of your command. The fact that there is a "%2" in the command means that we are exploiting the concept of REPLACEABLE PARAMETERS, which needs a bit more explanation. If I type in the "LOOK4 MYM" command, then the "LOOK4" is a parameter (called "%0"), and the "MYM" is another parameter (called "%1"). If we had phrased our command with one more parameter by typing in "LOOK4 MYM P", then the "P" is the parameter called "%2". It can go all the way up to parameter 9 if you want. I never go beyond parameter 3, personally. So, if I were to translate this whole command into babytalk English, it would say this: "Check to see if the human being put a "P" as the third word in the command. If they did, skip the next few lines until you find a line consisting of the word 'PRINT' with a ':' at the beginning of it. At that point, continue doing the next few lines after it. If there is NOT a 'P' at all, or the parameter is anything BUT a 'P', just continue with the next line." TYPE XFERLIST | FIND "%1" >OUTPUT.FIL is a VERY good line to learn from. Here's the English translation: "Literally display or dump the file called XFERLIST, only instead of dumping it to the usual place, send it through a pipe, right into the waiting arms of the FIND command. The FIND command will then look through the whole file, checking to see if each line might contain the second word of our command (which is MYM in our example). Once the lines containing that word have been found, set them aside. After you're done, don't dump them to the USUAL place, (which is the display monitor), dump them into a file called OUTPUT.FIL". Believe it or not, all of these concepts are hidden in the DOS manual, and have been there since DOS version 2.00! This is all a good way to learn about the FIND filter, which needs to be used with a LARGE RAM-Disk, because it needs LOTS of room to work with. It creates several temporary files that it uses as "scratch pads", and then erases them without your ever seeing them. If you ever run into a "File Creation Error" error message, you'll need to enlarge the size of your RAM-Disk by modifying your CONFIG.SYS file. TYPE OUTPUT.FIL | MORE is the way we make sure our freshly found information doesn't go scrolling right off the screen. For example: there are HUNDREDS of filenames that end with .BAS in the XFERLIST database, and if you issue the "LOOK4 .BAS" command, you would normally get these hundreds of lines scrolling past on the screen, too fast to read. So, here is the English translation of this line: "Normally, we would dump the contents of the file called OUTPUT.FIL directly to the screen, but instead, lets feed it through a pipe into the input of the MORE filter, which will make sure that we get each pageful of information in an orderly manner". GOTO END means "skip the next few lines until you find the label called END. We'll know it's a GOTO label because it starts with a colon". :PRINT is a GOTO label that begins our printing option. TYPE XFERLIST | FIND "%1" >PRN works just like the previous line four lines above, only the output is different. Instead of storing the output in a temporary file called OUTPUT.FIL, we redirect the output to the printer, which has a reserved device name of PRN. :END is only a GOTO label that we can skip to when we're done, if we need it. IF YOU WOULD LIKE TO USE THE LOOK4 PROCEDURE ON A HARD DISK. This will work perfectly well, just a little slower. My LOOK4 MYM example slowed down from 8.89 seconds to 14.68 seconds, which is STILL plenty fast. REQUIREMENTS: ================== - DOS 2.00 or higher - A suitable hard disk, with the PATH command set up (if necessary) to use FIND.EXE, MORE.COM, FLIP.COM and LOOK4.BAT files on the XFERLIST file, whatever directory it's in. You'll need the following files: Standard DOS files ================== FIND.EXE MORE.COM Plus the following files which SHOULD be included with this file: ================== FLIP.COM LOOK4.BAT And, finally, the main file with all of the data. ================== XFERLIST Just make sure that all of the files can get to each other using the PATH command, and it should work like a little charmer. For example: if you have the FIND.EXE, MORE.COM, FLIP.COM and LOOK4.BAT files in a subdirectory on drive C: called C:\DOS, and you have the XFERLIST file in a subdirectory called C:\DOWNLOAD, you may issue the following commands: PATH=C:\DOS means that we want to give commands, and we want DOS to follow our commands EVERY time. By giving the PATH command each time we start up the computer, we're telling DOS where it can find further information if it doesn't understand us. The THEME of my C:\DOS subdirectory is that it contains all of my TOOLS AND GOODIES. DOS will use the news it got from the PATH command to find any tools and goodies it needs. CD\DOWNLOAD to change the default directory to the one containing the XFERLIST file. We can then use the LOOK4 command any way we want, and it will work beautifully! HOW DO YOU KEEP YOUR XFERLIST FILE CURRENT? I don't know which communications software YOU use, but I personally use Symphony. Just about ANY telecommunications software will allow you to capture data into a file. If I'm telecommunicating with the Chicago BBS, I tell it to List all files. (There is an option to list only the files that are New since the bulletin board was called last, but I personally have never found it to be reliable). I watch these new filenames scroll by until I see one that I recognize. (I'm capturing all of this information in memory, and can go back later and edit it). I then delete any information that I already have in my old XFERLIST file, and then print out the parts I want into a plain ASCII file. Then, I use DOS to add the new file onto the old XFERLIST, making it current! Here's how I do it: If my new ASCII file contains about 20 new rows of information, and it's called 21NOV85.TXT to show that it's that particular day's new listing, and the old file called XFERLIST is in the same directory, here are the commands I would use to add 21NOV85.TXT to the end of XFERLIST: COPY XFERLIST + 21NOV85.TXT TEMP.FIL This would create a new, bigger file (called TEMP.FIL) that would have the entire contents of XFERLIST first and then the 21NOV85.TXT contents right after it. Then, DIR To make SURE that I had created a bigger file called TEMP.FIL, so I could safely go on with the next step. ERASE XFERLIST ERASE 21NOV85.TXT To get rid of the old duplicate information files. RENAME TEMP.FIL XFERLIST Which would make sure that my LOOK4 batch file would not need to be re-written. This procedure is technically referred to as CONCATENATION OF FILES. ========================================================================== HOW TO FIND ME Have fun, and if you want to reach me for questions or suggestions, here's how you do it... If you DON'T subscribe to the CHICAGO Bulletin Board run by GENE PLANTZ, you REALLY should! To me, it's like living in Paris! I can find just about ANYTHING my little heart desires in a VERY short time. Hook up your modem and communications software and become a paid-up member of the bulletin board. Here are the necessary parameters: PHONE NUMBER: (312) 885-9557 BAUD RATE: 1200 PARITY: NONE LENGTH: 8 STOP BITS: 1 If you would like to leave an electronic message for me, my ID number is ID1018.