FINDING A FILE

It is often necessary to find a file when we have forgotten where we have stored it. Once again XTree comes to the rescue. Files can be found either by searching for the filename or by searching for some word or phrase they contain.

To find a file by filename, you use Filespec. Hit F and enter the name; wildcards (* and ?) are accepted. Now only files conforming to that specification will be displayed by XTree. To list all conforming files on the current disc, hit S (Showall). As you highlight each file, its directory (path) will be shown at the top of the screen.

To search on the contents of files, the first step is to tag all files to be searched. It is desirable to keep the number of files to be searched as low as possible for, although searching is surprisingly fast, it can still take a significant amount of time to search a large number of files. (For instance, a recent search of some 11,000 files occupying 290 MB on two disc partitions, both compressed with Stacker, took 38 minutes).

Set the Filespec if you know any part of the filename. Then hit B to select a branch which you know, or suspect, contains the file, otherwise hit S to select all files on the disc. Next tag all files with Ctrl-T. Then, to search them all, hit Ctrl-S. After you have entered the phrase to search for, the search will start; the contents of each file will be scanned for the phrase, and if it is not found the file will be untagged. So at the end of the search only the files containing the phrase searched for will be tagged, and to display these files only hit Ctrl-F4 (note this command: it is not documented).

If one of these files is now Viewed, the phrase is still selected for searching; hit the spacebar and you will jump straight to its first occurrence. You can also use Ctrl-V to view all the files, with Space searching out and highlighting each occurrence of the phrase in each file in turn.

But perhaps you don't know the filename, or any of its contents; you only know the date on which you wrote it. To find it, either re-sort the files in date order: hit Alt-S, then D; if you now select S(howall), and change the file display with Alt-F until the date is displayed, you will find all files created on this date together.

Alternatively, change the Filespec to display only files written on the day in question: hit F, then type = followed by the date.

Tom Ruben

up to XTree tips index