Classic Computer Magazine Archive START VOL. 4 NO. 1 / AUGUST 1989


Finding Lost Files Made Easy


You've got a 20-megabyte bard disk that's full to the brim with hundreds of folders and files. One day a friend asks you if you still have that public domain game you downloaded months ago. You think you do but where? With START Magazine and David Jarvis' File Search, you need never again worry about "lost" files. The program runs in all three resolutions.

Forget where you put those files? Jog your memory with FSEARCH.ARC on your START disk.

File Search is a desk accessory that will quickly locate files and programs, whether they're on floppy disks or buried deep within folders on your hard drive. But File Search goes well beyond a basic file-search utility to become something of a file manager as well. lt can find a file anywhere on any of your disks, even if the file is "hidden." And once the file is found, File Search will let you perform a number of useful operations, including browse, print and copy.

File Search can find
a file anywhere on
any of your disks.

But that's not all. File Search supports wildcards, and a special option lets you either display each match it finds or simply count the matches (and the number of bytes occupied by each) and then give you the totals when it's finished. And since File Search is an accessory, you won't have to leave a GEM application to take advantage of it.

To run File Search, copy FSEARCH.ARC and ARCX.TTP onto a blank, formatted disk and un-ARC FSEARCH.ARC following the Disk Instructions elsewhere in this issue. Then copy the file FSEARCH.ACC onto your boot disk, and reboot your computer. Remember that GEM only supports a total of six desk accessories, so if you already have that many installed, you'll need to deactivate one of them to use File Search. The program was written in Mark Williams C; the source code is also in the file FSEARCH.ARC.

The Search Begins
After the accessory is installed, click on File Search under Desk on the menu bar. The main File Search dialog box will appear. Type in a specific filename, click on the disk drive you wish to search, then click on Search. Click on Quit to return to the Desktop.

There are three
Search options.

When you click on the File Search accessory, you'll see this dialog
box. Now you just lype in the name of the "lost" file, choose the
drive you wish to check, and then click on Search- presto! You've
found your file, even if it's hidden.

You can narrow a search down further by entering a folder name before the file specification; the folder name must be preceded by a backslash (for example, \LETTERS\JONES.DOC).

Once the search begins, File Search will check whichever disk you specified, beginning at the root directory and continuing through all folders on the disk until it finds a match. Then, unless you specified Totals Only in the main dialog, you'll see a second dialog box that describes the file and gives you a number of options. The information about the file displayed here includes the full filename, the file size, the last date and time the file was updated and the file's attributes.

Note: Attributes are the specific conditions TOS associates with a file. TOS allows up to six attributes: Read Only, which can be set from the Desktop File drop-down menu; Hidden, which won't show in a GEM directory window; System, a file created for use by TOS; Volume, the disk label; Folder (or subdirectory); and Archive, which means that the file has not been changed since the disk was last backed up. If a file has one of these attributes, its box will be highlighted; if not, its box will be shadowed.

Two types of options are available to you now: TOS functions and Search functions. There are six TOS functions: Browse, Rename, Copy, Move, Delete and Print.

Browse lets you rapidly scan a file's contents without having to invoke an editor. This is useful when you only need to read part of a file, or determine which version of a file is the one you want. When selected, Browse opens a window and displays the file's contents, one page at a time. Browse displays only the ASCII characters in a file. You can move or resize the window the same way you would any other GEM window. Click on the close button to return to the dialog box describing the file.

Copy, Move, Rename and Delete are pretty self-explantory. The first three options will require you to enter a second filename. Delete will ask you to verify the operation before it actually erases the file. Print lets you print out a hardcopy of the file.

At this point, there are three Search options available: Continue Search, Return to Search Menu and Quit. Continue Search is the default; you can invoke it just by pressing [Return] or [Enter]. It tells File Search to keep on rummaging through the disk until it finds another match or has searched all folders.

Quit clears the dialog box and then returns you to what you were doing when you selected File Search. Select Return to Search Menu to return to the main dialog box. This option remembers the current file search specification, so you can quickly look for the file on another drive. Alternately, you can type in a new file to search for and begin again.

Wildcard Support
File Search lets you search for files by typing in wildcard characters. Wild-cards let you search for words or groups of words that have the same characteristics. There are two wildcard characters recognized: a question mark (?) and an asterisk (*).

File Search
supports wildcards.

When you conduct a wildcard search with a question mark, your ST will replace the question mark with any single character. An asterisk, on the other hand, will be replaced with more than one character. For example, if you search for T?T, the computer might come up with TAT or TOT. But if you search for T*T the computer will come back to you with anything from TART to TRUMPET. You'll find this one of File Search's most convenient features.
Because File Search can search an entire hard drive partition for a file, it is very easy to exceed the ST's so-called 40-folder limit by using this program; this can wreak havoc with your drive's directory. Because of this problem, we highly recommend using File Search together with Atari's copyrighted FOLDRXXX.PRG terminate-and-stay-resident fix for the 40-folder limit. If you don't have FOLDRXXX.PRG, it is on this issue's START disk in the file FOLDRXXX.ARC. Un-ARC this file onto a blank, formatted disk and read the enclosed documentation. We consider this program a necessity for any hard drive owner using File Search or other directory-intensive application.

Hey, It's a Floor Wax, Too!
Well, File Search isn't really a floor wax, but it does have other uses than those already covered. First, there's a feature designed for the times when you know a file is on one of several disks, but forget which one. For example, your friends are waiting to see that nifty. public-domain game called Stinker you downloaded last week. Unfortunately, it's on one of 15 disks labeled "Games." Now where is it? File Search can help. Just put the first disk in the drive, access File Search, enter STINKER. * and click on Search. if File Search doesn't find a match on the current disk, a dialog box will appear telling you so. Note there's a second option: Repeat. Before clicking on Repeat, put the second disk in the drive. And start the search again. I think you get the idea.

File Search can also provide you with some statistics about files on a disk. In the main dialog box, there are two boxes under the word Report. One says Each Match, and the other says Totals Only. The former is selected by default. If you click on the latter before conducting a search, File Search will not display each file it finds that matches the specification you entered; instead, it will continue searching. When it's finished, you'll see the results, either that no matches were found, or how many matches were found and the total number of bytes used by all matching flies.

After File Search has found one or more matching files using either "Each Match" or "Totals Only," you can examine the list of files found by clicking on Browse under Files Found on the main screen. You can print out the list of files by clicking on Print.

The Totals Only option can be put to some interesting uses. Suppose, for instance, you have files with the extension .DOC all over your hard-disk drive and would like to know how much space they occupy. You can find out by clicking on Totals Only, entering "* .DOC" as the filespec, then clicking on Search. In a few moments the results will be displayed to you.

A final feature of File Search is that it will find "hidden" files. As mentioned before, files with the "hidden" attribute don't show up in GEM directory windows (the list of files that appears in a window when you click on a drive or folder). However; File Search disregards the standard protocol to "ignore" such files. So even if you've changed a file's attribute to "hidden," it will show up again under a File Search.

David Jarvis is a programmer who lives in Richmond, Kentucky. He wrote Ear Trainer in START Special Issue Number Two.