
SLfile  -- A Windows Utility to Locate, Search, and Process files.
Version 1.0





SLfile Version 1.0

Copyright (c) 1996, Stan Leeson
All Rights Reserved


SLfile is a flexible and powerful utility program that allows you to
quickly locate files based on any combination of the drive and directory
location of the files, the file name pattern, the file size, the
last modification date, and the file contents.  Once matching files
have been found, SLfile will, optionally perform a preselected action
on each of the matching files.

SLfile is fully configurable to better fit your particular needs.  Once
you set options and enter file selection parameters during the normal
use of the program, SLfile will remember those selections and present
them as the defaults for future sessions until you change them.  There
are two key exceptions to saving configuration information.  The selected
action always defaults to "Do nothing" and the option to ask about file
deletions is always selected.  These provide some additional safety in
using SLfile.

The sections that follow present an introduction to SLfile.  You can gain
a more in-depth understanding of the program by using it.  Experiment with
the program and browse the help file.  Once you have seen it in action, you
may want review this documentation again.  Hopefully, the terms used and the
descriptions of the user interactions will be easy to follow once you have
been introduced to the program.

This manual is divided into the sections shown in the list below.  The
sections appear in the order shown in the list.
    Installing SLfile
    Uninstalling SLfile
    About Phases and Modes
    Descriptions of the Controls
    Descriptions of the Menus
    Sample Usage Scenarios  (only in Help and SLfile.WRI)


Installing SLfile
=================
The installation instruction provided are generic.  They assume you that
you have a basic working knowledge of the Windows user interface and file
operations.
1.  Create a new directory for SLfile or select an existing file
    for it.  You can use the DOS command MKDIR or the Window file
    menu option to create a directory.  In Windows95, you may use
    the "New" menu selection in the file explorer.
2.  Copy the file(s) into the selected directory.  If the
    distribution was in a compressed format, there will be a single
    file.  Otherwise there will be multiple files.
3.  If there was a single compressed file, uncompress it into the
    full set of files.  If it is a ZIP format file, you can use PKUNZIP
    or an equivalent utility for this purpose.
4.  Make the program available in the Windows user interface.  For
    Windows 3.1, this will consist of selecting a program group and
    running the "New.." option from the File menu to add a program item
    to the group.  In Windows95, this will consist of the taskbar setup
    option to add a program.

This completes the generic installation instructions.  See your Windows
or DOS reference manuals for more details.


Uninstalling SLfile
===================
The uninstallation instruction provided are generic.  They assume you
that you have a basic working knowledge of the Windows user interface
and file operations.
1.  Delete the SLfile.exe, SLfile.hlp, and SLfile.wri files from
    the directory selected for them during the installation.
2.  Delete the SLfile.ini file from the Windows directory.  This
    will typically be C:\WINDOWS, but it may be different on your system.

This completes the generic uninstallation instructions.  See your Windows
or DOS reference manuals for more details.


About Phases and Modes
======================
There are two key concepts that are crucial to any discussion of using
SLfile.  These are phases and modes.  There are three phases to SLfile
processing.

When you start SLfile processing by pressing one of the buttons, it
may execute in one of the phases, any two phases, or all three phases.
This is determined by what mode you selected for SLfile and which button
you pressed.  If more than one phase is executed, they will execute in
the order shown below for any given file or set of files.
1)  Locate Phase -  In the locate phase, files matching the drive,
    directory, file name pattern, size limits, and/or modifcation date
    limits that you set will be located, and their file paths will be
    written to the file list page of the SLfile screen.
2)  Search Phase -  In this phase, one or more files from the file
    list will be searched to determine if they contain the string
    or strings you selected as search targets.  If there are no search
    targets defined, this phase will be skipped.  The action file
    normally processes files from the file list.  If a file is searched
    and it does not contain any of the target search strings, its file
    list entry will be changed to start with a minus sign.  This indicates
    an unsuccessful search.
3)  Action Phase -  The action phase processes each file that successfully
    matched the preceding phases according to the action that you selected.
    These actions range from "do nothing" to "delete the file".  The
    action file normally processes files from the file list.  Any file
    whose entry has been modified to begin with a minus sign will be
    skipped.

The flow of processing between the phases is determined by the basic
execution mode of SLfile.  There are three defined modes.
1)  CAUTIOUS Mode -  In the cautious mode, only one SLfile phase will be
    executed, and that phase will process all available matching files.
    In cautious mode, if you press the "Locate" button, SLfile will locate
    all files that match the selection criteria, but it will not search
    the contents of any of them or apply selected action to any of them.
    If you press the "Search" button in this mode, any files in the file
    list will be searched, but not actions will be performed.  If you press
    the "Action" button, actions will be performed on qualified files in
    the file list.  This mode is named cautious because it allows you to
    be very careful of what is done in each phase.  You can examine and
    edit the file list between phases to ensure that it is doing exactly
    what you want.
2)  QUICK Mode -  Quick mode is the default mode.  This mode links the
    processing of the Locate and Search phases so that the Locate Phase
    processing automatically flows into the Search phase.  If you press
    the "Locate" button in quick mode, each time the locate phase finds a
    file that matches the selection criteria, it is immediately searched.
    If there are no target search strings defined, the search is skipped.
    If you press the "Search" or "Action" button in quick mode, it is the
    same as pressing it in CAUTIOUS mode.
3)  EXPRESS Mode -  Express mode links the processing of all three phases
    so that each one automatically flows into the next.


Descriptions of the Controls
=============================

Main Page Parameters
The Main page of the SLfile control screen provides the basic parameters
to control the locate and search phases of SLfile operation.  It contains
the controls to set the base drive and directory for files to be examined,
set the file name pattern(s) to be used in selecting files, and set the
search target strings to be used in searching the file contents.

The base drive and directory for the search may be set in a browse mode by
making selections in the drive combo box and the directory selection control.
In this case, the selected drive and directory are reflected automatically in
the edit box titled "Locate files in drive and directory:.  The drive and
directory information may also be entered directly into that edit.

The file name selection pattern may be chosen from one of the predefined
choices from the "Locate files matching pattern:" combo box. They may also
be selected by entering the selection pattern directly into to edit portion
at the top of that combo box.  If square brackets, "[]", are present in the
file pattern string, only the portion of the string included in the brackets
is used as the selection pattern.  If multiple patterns are specified, they
must be separated by semicolons. to increase the performance of SLfile, limit
the number of selection patterns to just those necessary for the selection
of the desired files.  Additional patterns may match unwanted files and will
slow the locate phase.  The choices in the "Locate files matching pattern:"
combo box can be edited using one of the selections in the Edit menu. This
Edit search file choices option allows you to specify the choices to be
presented in this control in the future.  The search target strings (if any)
are entered in the control labeled "Search for String(s):".  Each search
target should be entered on a separate line.  During the search phase each
matching file will separately searched for each of the specified strings.
This page also includes some output values from the results of the last
SLfile operation.  The "Count matching name" field shows the number of
files that matched the file name selection criteria in the locate phase
of SLfile.  The "Total size of matching files" field gives the total size
in bytes of the set of files that matched the locate phase selection
criteria.  These are the files that were listed in the file list
page.  This total is useful for determining how many bytes would be freed
by a delete action or how many diskettes would be needed for a copy action.
The "Name of largest match" field gives file name and path of the largest
file that matched the locate phase selection criteria.  The "Size of largest
match" gives the size of that file.  The "Count matching contents" field
shows the number of search phase matches of search target strings were
found. This field is incremented each time a matching string is found in
one of the files. 

The "Mode" field shows the currently selected SLfile operation mode.  This
mode is set using a combo box control on the SLfile options page.


Size + Date Page Parameters
The Size + Date page of the SLfile control screen provides the parameters
to control the locate selection of files based on file size and/or
modification date values.

The file modification date selection can be set to any of the following
modes using the combo box labelled  "Date Comparison":
    Ignore Date
    On or After Date
    On or Before Date

These control the type of comparison that is done between the modification
date of the file and the date specified in the control labelled
"Date (MM/DD/YY)".  As indicated in the title, the comparison date is
entered with a month number followed by a day number followed by a two
digit year number.  The number fields are separated by slash characters.

The file size selection can be set to any of the following modes using
the combo box labelled "File Size Comparison":
    Ignore File Size
    File Larger or Equal To
    File Smaller or Equal To

These control the type of comparison that is done between the size of
the file and the size specified in the control labelled "Size (bytes)".
The comparison size is entered as a decimal number of bytes.

Options Page Parameters
The Options page of the SLfile control screen provides the parameters
to control more detailed aspects of the locate phase selection of files
and the search phase processing of file contents.

Most of the options are selected using check boxes.  The following
parameters are selected using this method.

Subdirectory search
If checked, all directories below the base directory will be examined
for matching files during the search phase. If not checked, only the
indicated directory will be used.

Match case
If checked, during the search phase, strings in the files will only match
the target search strings if the case of the letters in the strings is
the same.  If it is not checked, a case insensitive comparison will be done.

One match per file
If checked, during the search phase, the search of each file will be
discontinued once the first match is found. If it is not checked, the
search will continue to the end of the file.

Auto-select context type
If checked, during the search phase, the context information will be
matched to the type of file being searched.  Text files will have ASCII
text context information recorded.  Non-text files will record the context
as hexadecimal representations of bytes.  If it is not checked, all context
information wil be recorded as ASCII text.  If non-printable characters
are encountered in ASCII text presentations of the context, the tilde (~)
character will be substituted for each non-printable character.

Use exclude pattern
If checked, during the locate phase, the contents of the edit control
labelled "Exclude pattern from locate match" will be examined.  If this
pattern contains a valid file name pattern, files that otherwise match the
locate phase selection criteria will be excluded from the set written to
the file list.

Report line number
If checked, the search phase report of a match written to the SLfile search
output page will include line number information.  If it is not checked,
this will be omitted.

Report each file searched
If checked, the search phase report of a match written to the SLfile
search output page will include the file path for each file searched.  If
it is not checked, this will be omitted.

Report match context
If checked, the search phase report of a match written to the SLfile search
output page will include the text around the location of the match.  If it
is not checked, this will be omitted.

Report actions performed.
If checked, during the action phase SLfile will report each file action
performed.  If it is not checked, this will be omitted.

Report locate matches to Results.
If checked, during the locate phase, SLfile will report located file to
the Results Buffer in addition to writing it to the file list.  If it is
not checked, the matches are only written to the File List.

The Options page also allows you to select the basic SLfile execution mode
using the combo box control labelled "Mode of operation".   


Action Page Parameters
The Action parameters page of the SLfile control screen provides the
parameters to control the processing of the action phase. First select
the basic type of action to perform on each matching file. Then select
any additional parameters that apply to that type of action. The file
action choices are:

    Delete files in list
      When this option is selected, each file that matched the criteria
      used during the  locate phase and matched the search phase search
      strings (if any) will be deleted. This option should be used with
      caution.  It is recommended to not use the delete option in EXPRESSS
      mode.

    Copy files to disk(s)
      This option will copy each matching file to the indicated disk and
      directory.  It can be used to copy the files to diskettes by selecting
      the floppy disk drive and selecting the root directory.  It can also
      be used to copy the files to an existing directory on a hard disk.

    Move files to disk(s)
      This option will move each matching file to the indicated disk and
      directory.  It can be used to move the files to diskettes by selecting
      the floppy disk drive and selecting the root directory.  It can also
      be used to move the files to an existing directory on a hard disk.

    Set attributes of files
      This option will set the attributes of the files to those attributes
      indicated in the associated check box group.

    Report file properties
      This action will report on the location, size, modification date,
      and attributes of each selected file.

    Do nothing
      As the name implies, this leads to the action phase being skipped
      during execution modes that would normally invoke file actions. This
      is simply an alternative method of shutting of action processing.


The control labelled "Disk drive for copy/move" allows you to select the
destination drive for these operations.  The control labelled "Copy/move
directory" provides a means of setting the destination directory.

The file attributes to be set are selected using a check box group labelled
"Set File Attributes".  The choices are the standard DOS file
attributes: Hidden, System, Read Only, and Archive.




Descriptions of the Menus
==========================

SLfile File Menu

The SLfile file menu provides the following menu choices:
    Save Results
    Save File List As...
    Save Results As...
    Print File List...
    Print Results...
    Print Setup...

The Save Results choice is only available after the search results buffer
has initially been saved to a file.  This will save the current buffer to
the same file.

The Save File List As choice allows you to select the file to be used to
save the current contents of the file list buffer.

The Save Results As choice allows you to select the file to be used to save
the current contents of the search results buffer.

The Print File List choice allows you to print the current contents of the
file list buffer.

The Print Results choice allows you to print the current contents of the
search results buffer.

The Print Setup choice allows you to set the printer control parameters.


SLfile Edit Menu
The SLfile edit menu provides the following menu choices:
    Cut from Results
      The standard clipboard Cut operation.
    Copy from Results
      The standard clipboard Copy operation.
    Paste to Results
      The standard clipboard Paste operation.
    Select All in Results
      The standard clipboard Select All operation.`
    Delete Results
      The standard Delete operation on selected text.
    Set font in Results
      Set the font in the Results buffers.
    Find in Results
      Find a string in the Results buffer.
    Replace in Results
      Replace a string in the Results buffer.
    Toggle to File List
      Change all of the preceding options to operate on the
      file list buffer.
    Edit Search File Choices
      Change the choices in search file combo box.



SLfile HelpMenu
The SLfile help menu provides the following menu choices:`
Contents
  Presents this help file.
About
  Presents SLfile copyright information.  This product has
  a copyright by Stan Leeson, 1996 or later with All Rights Reserved.
Contact addresses
  Presents SLfile author contact information.  You may contact the
  author at the following addresses:
        Stan Leeson
        P.O. Box 130672
        Roseville, MN  55113-0006

        E-mail:  sdleeson@msn.com



