NUKE.EXE Short Text File Written by Michael MacDonald 09/09/90 rev 01/01/91 NUKE is a compiled clipper PRG program. It is 'freeware'. No fee is expected or will be accepted. It's purpose is to check RoboComm's NEWFILES.DBF (the database that keeps track of new files on the BBS's you call) for strings of text that you input, then mark as deleted any matches it finds. It will first ask if you want to search the filename field. For instance, if you want to delete all files with an extension of GIF, you would input '.GIF'. Note the period. With it, NUKE would bypass filenames like VIEWGIF.ZIP. If you wanted that file to be picked up as well, you would not use the period in the text you input. NUKE searches for the occurrence of the text anywhere in the filename. ie BTM2GIF3.ZIP or GIF2BTM.ZIP or GIRL.GIF would all get picked up by the 'GIF' input. After NUKE is through with this search, it will ask you if you want to search the description field. Here is where you would input 'game' to delete all files with the word 'game' in their descriptions. Or input 'window' to get files with the word 'window' in the description. Be careful here. For instance, if you input 'win' NUKE will delete a file with the word 'shoWINg' in the description. Use as much text as you think you can. ie, To delete Windows programs, use 'window' as the input, or 'win3' vs using 'win'. NUKE may miss a few this way, but the chance of 'false hits' will be greatly reduced. You can input the text in upper or lower case, or even a combination if you were so inclined. NUKE will automatically take care of searching for all the combinations that may occur. ie, If you input 'window', NUKE will search for 'WINDOW, window, or Window'. The last thing NUKE will do is ask if you want to 'Pack and Reindex' the database. Until this process, the files are only marked as deleted. The file can be UNdeleted, by simply pressing the delete key while that file is highlighted. (When viewing it with RoboComm). Once you 'Pack and reindex' the record of that file is gone and cannot be brought back. There is a separate utility in this archive called PACK, that will do the job for you as well, or you can have RoboComm do it by choosing 'Pack' when you exit the program. I think you will find the 'Pack and reindex' routines I have written are a great deal faster than RoboComm's. There is a reason for this, and it wouldn't be fair to RoboComm's author not to explain the difference. RoboComm uses a safer method. Instead of rewriting the new database directly over the old one, the way I do, RoboComm creates a temporary DBF file, that only contains the files that aren't deleted. It then deletes the original DBF and renames the temp. A power outage, or 'disk full' error in the middle of a pack could possibly end up in a corrupted database. The 'cost' of this safety is pretty high, in terms of speed. And I have tried to 'create' circumstances where my way could corrupt the database. I haven't been able to do it. Even by rebooting, or shutting the PC off in the middle of the routine. But, in theory it is possible. Therefore, I have left the option open to the user. A final note. NUKE is thorough, but may not find every occurrence of the string you input. For instance, the description field it searches contains only the first 45 characters of the file description. The 2,3,4, etc lines of the file description are stored in a field and a separate file. (NEWFILES.DBT) The extra code involved, and more importantly the time to execute that code, in searching this field were, I felt, not worth it. Almost 100% of the time, I have found that the 'key' text is contained in the first 45 characters. ie, If a program is a game, the word 'game' is usually there. If a program is for use under Windows, you'll find the word 'Windows' or 'Win' almost immediately. NUKE can reside anywhere, but you must be in the directory where you keep your RoboComm files when you invoke it. The source code has been included for any Clipper users that wish to play with it. Michael MacDonald - Seattle, 1991