FastFind - Dave Dunfield - Jul 28 2012

FastFind (FF) is a program to rapidly locate and view/edit files in a large
directory tree. FF builds a database of filenames and locations, and can
rapidly search that database for files matching a given pattern. It can also
search the specified files for a string. When the matching files are located
they are presented in a menu allowing you to quickly view/edit the file.

FF is a 16-bit program, however it recognizes long filenames when run in an
environment supporting them.

use: FF filespec* [search_pattern] [opts]

opts:   /B...           = Build index database
                D       - do not process hidden/system Directories
                H       - do not record Hidden files
                S       - do not record System files
                .       - do not process directories beginning with '.'
        /C              = Case sensitive search
        /D              = edit Default setup
        /S              = do not collapse Spaces
        I=file          = specify Index file            [$FF$.IDX]
        T=[path]file    = specify Temp file             [%TEMP%\$FF$.0-9]


BUILDING THE DATABASE:
----------------------
Before you can use FF, you must build the database. You should also rebuild
the database any time you add or remove files from the tree. Simply go to
the root of the directory tree and enter the command: FF /B

You may opt to exclude certain types of files as described under 'opts'
above. For example, to exclude Hidden & System files, use: FF /BHS

You may also specify one or more file specification patterns to match when
building the database - in this case only matching files will be indexed.
for example: FF /BDHS *.C *.H *.ASM
will index only files ending with .C, .H or .ASM

NOTE: File specification patterns follow the unix model where '.' has no
special meaning. ie: to specify all files, use: '*'. '*.*' will only
process files that have a '.' in their names.


SEARCHING FOR FILES:
--------------------
You can perform FF searches when positioned to the root of the tree (the
location of the $FF$.IDX index file.

To search for files by name, simply use: FF <file-specification-pattern>
eg: FF main.c                  <= Find all occurances of main.c
    FF dave*                   <= Find all files beginning with 'dave'
    FF *.h                     <= Find all .H files

To search for a specific string within a file, use: FF <file-spec> <string>
eg: FF *.c printf               <= Find 'printf' in all .C files

By default FF uses a case-insensitive text search - if you wish the search
to be case sensitive, use the /C command line option.

You may specify more than one file specification:
eg: FF *.c *.h #include         <= Find '#include' in all .C and .H files

If you wish to search for multiple files by name and NOT search for a string,
use a null search string:
eg: FF *.c *.h                  <= Finds '*.h' in all .C files
    FF *.c *.h ""               <= Find all .C and .H files


VIEW/EDITING FILES:
-------------------
Once FF finds all matching files, it will present you with a menu of the
full filenames (including path).

If you searched for a text string, it will show a line for each occurance of
the string - in this case the filename will be followed by <n> where 'n' is
the line number on which the string occurs, and the content of the line. For
brevity all strings of spaces and tabs occuring in the line will be reduced
to a single space (use the /S command line option to prevent this).

The following command keys can be used:

Up/Down         <= Move selection pointer by one line
PgUp/PgDn       <= Move selection pointer by one screen (24 lines)
Home/End        <= Move selsetion pointer to Start/End of list
Left/Right      <= Position horizontal view by 1
^Left/^Right    <= Position horizontal view by 1/5 screen (16 lines)
^Home           <= Reset horizontal view to column 1
F1              <= Set position to last selected file
F2              <= Set position to tagged region
F3              <= Write tagged region to a file
F4              <= Tag/Untag line/block
F5              <= Toggle filename display ON/OFF (text search only)
F6              <= Search files for string
                   F1 = Get selected line (edit to get desired text)
                   F2 = Toggle case sensitivity (/C) ON/OFF
                   F3 = Toggle collapse-spaces (/S) ON/OFF
              Up/Down = Select previous search strings
F9              <= Execute command for current file, you may use:
                   %S = insert Short filename
                   %L = insert Long fiename
                   %T = insert Temp file (generated index)
                   %# = insert Line number (0 if no text search)
F10             <= View file in HEX
                   Executes an external HEX viewer
ESC             <= Exit FastFind
ENTER           <= View file as text

When viewing a file as text, the following command keys can be used:

Up/Down         <= Move selection pointer by one l ine
PgUp/PgDn       <= Move selection pointer by one screen (24 lines)
Home/End        <= Move selsetion pointer to Start/End of list
Left/Right      <= Position horizontal view by 1
^Left/^Right    <= Position horizontal view by 1/5 screen (16 lines)
^Home           <= Reset horizontal view to column 1
F1              <= Set position to found text (text search only)
F2              <= Set position to tagged region
F3              <= Write tagged region to a file
F4              <= Tag/Untag line/block
F6              <= Search files for string (see above for subkeys)
Tab             <= Toggle tab expansion (2, 4 or 8 spaces)
ESC             <= Exit Text View
ENTER           <= Edit file at current line position
                   Executes an external text editor


EXTERNAL PROGRAM:
-----------------
FF uses external programs to edit and view in hex. You can use the /D
command line option to edit the external program settings. The values
shown are the default values if FF is unconfigured.

  Temp file : $FF$
    This is the filename for the temporary file which FF uses to store
    the generated file index list.
    If path specifier occur ('\' or ':') then the file is automatically
    prefixed with the system TEMP= or TMP= environment variable location.
    If no extension is specified ('.') then the file is automatically
    suffixed with '.n' where 'n' is a unique number not conflicting with
    any existing temp file - this allows multiple instances of FF to be
    run without corrupting each others files.
  Index file: $FF$.IDX
    This is the name of the index file where FF stores it database.
  Small size: 50000
    To accomodate DOS in-memory editors which may not be able to handle
    files above a certain size, FF choses the editor to use based on the
    size of the file. The SMALL editor will be used if the file is smaller
    than this number of bytes, otherwise the LARGE editor will be used.
  Small edit: EDT %S C=%#
  Large edit: EB %S %#
  Hex.  edit: XV %S
    These are the system commands for the external SMALL, LARGE and HEX
    editors:
      %S = insert Short filename
      %L = insert Long fiename

NOTE: When FF is scanning for a suitable temporary file, it will display
      the names of any files which are busy. This output will be normal
      (and expected) when you are running multiple instances of FF, however
      if you see 'filename.n busy' when you are NOT running more than one
      instance of FF, it means that a previous run of FF was abnormally
      terminated and left a 'dangling' temporary file which you should
      delete.
