SWEEP TIP: WILDCARDS .............................................. Rick Ryall Many programs require you to type in the name of a file at some point during their operation, and many of them allow you to use wildcards to save a good deal of typing time. PIP, D (the alphabetized directory program), DIR (the built-in CP/M directory program), and NSWEEP are a few examples of these types of programs. This article will explain how to use wildcards in general and how to apply them to the use of NSWEEP. First of all, what is a wildcard? It is a character that represents all other characters, just like a wildcard in poker can be any card that the player chooses it to be. Wildcards can be used when you wish to perform an operation or set of operations on many similar files. The CP/M operating system that comes with all Kaypro models less than or equal to 10 recognizes two wildcard characters, "?" and "*". The question mark is a wildcard in exactly the same sense that a one-eyed jack is a wild card: it represents a single character in a single position, but it can be any one of the characters available. Thus, the filename BOGGLE.?AS would match BOGGLE.PAS, BOGGLE.BAS, and BOGGLE.(any character here)AS. Simple. The asterisk character is a wildcard in a different sense, though: it can represent more than one character. You can roughly translate the asterisk in a filename as "and any other characters that follow", making it a shorthand form of the question mark wildcard. In other words, you can do anything with a series of question marks that you can do with an asterisk, but with less convenience. Additionally, the asterisk wildcard applies only to the field that it is in, meaning either the name (the part before the period) or the extent (the part after the period). Let's do some examples to clear this up a bit, using NSWEEP as the example program since it has several options that allow you to use wildcards, including Find file, Log disk (which we discussed two issues ago), Rename file (which we may discuss next time), and Wildcard tag. We will assume that you have pressed the W key (which stands for wildcard tag) and have received the following prompt: Tag what? YOU TYPE WHAT HAPPENS W*.BAS All the files beginning with W and ending with .BAS are tagged. W???????.BAS Does the same thing that W*.BAS does. *.BAK All the files ending in .BAK are tagged, which is useful for erasing WordStar backup files. WS.COM Tags the file WS.COM only, since there were no wildcards in the name. *.* EVERYTHING is tagged. Useful when copying or erasing entire disks. ????????.??? Does the same thing that *.* does. You can see that the asterisk is more convenient in this case. LETTER.* Tags all files beginning with LETTER and ending with anything. LETTER.??? Does the same thing that LETTER.* does.