Introduction

SLfile provides Windows users with the ability to locate files based on the file name, size, modification date, directory,  and contents.  Any combination of these factors may be used to identify the files.  After matching files have been located, SLfile gives the ability to perform actions on those files.  The supported file actions include copying, moving, deleting, and listing the files or modifying their attributes.

Select a category of SLfile help.

SLfile user interface

Usage examples

Repeat welcome display


User Interface

User Interface and Control

Select a topic for detailed help.

SLfile phases:

Locate phase

Search phase

Action phase

Execution Modes

Control buttons

SLfile main menu:

File menu

Edit menu

Help menu

Main page

Size and date limits page

SLfile options page

File list page

SLfile search output page

File action selection page

SLfile status panels:

Locate phase status

Search phase status

Action phase status


Locate Phase

This phase of SLfile operation consists of finding files that match the file name, drive and directory location, file size limits, and file modification date limits that have been selected.   The file name, drive location and directory location are selected on the Main page of SLfile.  The file modification date limits are set on the  Size and date limits page.

During the locate phase, any files matching all specified constraints are written to the file list Output page of the SLfile control dialog. The file list can be viewed, edited, printed, or used as output to later phases of execution.


Search Phase

This phase of SLfile operation consists of searching the files in the file list Output page of the SLfile control dialog or the most recently located file if the LOCATE button was pressed and SLfile is not operating in CAUTIOUS mode.

If the SEARCH button is pressed, the file list is always used to select the files to be searched.  If none of the search tokens are found in the file, its entry in the file list will be modified to begin with a minus sign.  This shows that that file matched the LOCATE criteria, but it did not contain any of the tokens.  File list entries that begin with a minus sign will not have ACTION operations performed on them.


Action Phase

This phase of SLfile operation performs the selected action on each file that has passed the selection criteria of the previous phases. If SLfile is not operating in EXPRESSS mode, the action phase can only be entered by pressing the ACTION button.  In this case, the selection actions (if any) are performed on each file in the file list unless its entry begins with a minus sign.

If SLfile is operating in EXPRESSS mode, the selected actions will be performed on a file as soon as one of the following occurs:

** One or more search target strings were specified and the searched file contained a match.

** No search target strings were specified and the file matched the locate criteria.  In this case the SEARCH phase is skipped.


Execution Modes

SLfile provide three general modes of operation which may be selected on the Options page of the SLfile dialog.  The modes are CAUTIOUS, QUICK, and  EXPRESS.

These modes control how SLfile execution flows from one phase to the next.  CAUTIOUS mode provides no integration of the phases.  QUICK  mode integrates the locate and search phases.  EXPRESS mode integrates all three phases.


CAUTIOUS mode forces the user to explicitly start the file locating, searching, and actions separately using the individual buttons.


QUICK mode allows the search of each file to automatically occur as soon as a file is located.  When a file is found and one or more search strings have been specified, that file will be automatically searched.  The LOCATE button starts and integrated locate and search operation.  The ACTION operations must still be started separately in this mode.


EXPRESS mode integrates all three phases of SLfile operation. Once a file is located, it will be searched immediately.  If a search match occurs, or if there are no search strings specified, the selected action will be performed on the file.


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.  The "Subdir search" field indicates whether subdirectories will be searched.  It is set using a check box on the options page..  The "Size + date limits" field indicates whether there are any size or date limits imposed on file selections.  It is determined by multiple controls on the Size and date limits page.


Size and Date Page Parameters
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)".  The actual date format will depend on your Windows regional date format setting.  In this example, 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 the date separator characters as set in your Windows Control Panel regional settings.

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)".  As indicated in the title, 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 for non-text files will be reported as hexadecimal bytes.  If not checked, the context for these files will be reported as ASCII strings with the charcter tilde (~) substituted for non-printable characters.

Ask on file deletes

If checked, during the action phase, SLfile will ask for confirmation before deleting any files.  This option defaults to be checked on each SLfile session.  If you turn it off, it only affects the currect session.

Use exclude pattern

If checked, the Exclude pattern control contents (if any) will be used in limiiting locate phase matches.' Report line number

If checked, the search phase report of a match written to the SLfile search output pagewill 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 phase matches to Results.

If checked, during the locate phase SLfile will report each file located to the results buffer in addition to listing it in the file list.  If not checked, the files will only be included in the file list.

The Options page includes an edit control for listing a single file name pattern to exclude from locate phase matches.  This is enabled by a check box.  If this is enabled and contains a valid pattern, any files that otherwise match the locate criteria but whose name matches the exclude pattern will not be included in 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".


File List Page

The File List page of the SLfile control screen provides the list of matching files identified during the locate phase. This list is modified during the search phase processing of file contents.  Those files that did not meet the search phase criteria will have their file list entries modified by adding a minus sign to the beginning of the entry.  This prevents the action phase from processing those files.

You may also edit the file list directly to specify the files to be used in the action phase without first going through the locate or search phases.

The file list includes a data entry control labelled "Max files in list:".  When the file list reaches this limit, you will be asked if you want to terminate or discard the current contents and continue.  If the file list grows so large that it consumes all available resources, you will be given the same choice.

The file list page also includes an indication of the number of files currently in the list.  This indicator is labelled "File list count:".

There is a button to manually clear the list at any time.  This button is labelled "Clear File List".


Search Output Page

The Search Output page of the SLfile control screen provides the results produced by the processing in the search phase processing of file contents and/or the Action phase activities on the files.

The search output includes a data entry control labelled "Max lines of output:".  When the search output reaches this limit, you will be asked if you want to terminate or discard the current contents and continue.  If the output grows so large that it consumes all available resources, you will be given the same choice.

The file list page also includes an indication of the number of search phase matches currently in the output. This indicator is labelled "Count of matches:".

There is a button to manually clear the output at any time.  This button is labelled "Clear Results".


Action Output Page
Action Parameters Page

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 selection will report the properties of each matching file in the Results Buffer.  This will list the file name, size, modification date, and attributes for the files.

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.  If the action is set to "Do nothing", the Action button will remain disabled even when there are qualified files in the file list.

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.


Locate Phase Status Panel

This status panel shows the activity in the current locate phase or the locate phase that just completed.  It provides interim status information during a SLfile processing.


Search Phase Status Panel

This status panel shows the activity in the current search phase or the search phase that just completed.  It provides interim status information during a SLfile processing.


Action Phase Status Panel

This status panel shows the activity in the current locate phase or the locate phase that just completed.  It provides interim status information during a SLfile processing.


Control Buttons
SLfile Control Buttons

This control buttons at the bottom of the SLfile control display control the starting and stopping of SLfile processing in various modes.  The following control buttons are provided:

Locate button

This button starts the locate phase of SLfile processing. In CAUTIOUS mode processing, only the locate phase will be done.  In other modes, each located file will be passed to the search and/or action phases.

Search button

This button starts the search phase of SLfile processing. The files currently listed and enabled in the File list page will each be searched.  In EXPRESS mode processing, each file that contains search matches will be passed to the action phase for processing.

Action button

This button starts the action phase of SLfile processing. The files currently listed and enabled in the File list page will each be processed using the selected action.

Stop button

This button stops all phases of SLfile processing immediately. This can be used to end processing early when the status information indicates that the wrong files, or too many files, are being matched.

Exit button

This button terminates SLfile program execution.


SLfile Menus

The SLfile main menu provides the following menu choices:

File menu

Edit menu

Help menu


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 buffer.

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 Editing File Choices

SLfile Editing Search File Choices

This selection allows you to customize the search file choices that are presented in the SLfile Main page:SearchParams] control labelled "Locate files matching pattern:".  These choices will then be presented in that combo box in all future SLfile sessions.

The editing dialog also provides the option to return to the Original search file choices.


SLfile Help Menu

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


SLfile Welcome

Welcome to SLfile

SLfile is a powerful and flexible file system search and management utility.  It allows you to locate files based on any combination of drive and directory location, file name pattern, contents matching defined strings, file size, and modification date. After the files have been found, you can print the file list, print the string matching information, delete the files, copy the files, or modify the attributes of the files.

SLfile allows you to customize it by setting options, changing default file name patterns, setting default search drives, saving target search strings, modifying file size and date limit, and selecting a basic operation mode.

To begin using SLfile, terminate this HELP display and begin exploring.

You may also view the introduction or browse through the detailed user interface and Usage examples portions of the HELP.

I hope you find SLfile to be powerful, useful, and enjoyable to use. This program is Copyright (c) 1996, Stan Leeson.  All rights reserved.

Author contact addresses

You may contact the author at the following addresses:

Stan Leeson

P.O. Box 130672

Roseville, MN  55113-0006

E-mail:  sdleeson@msn.com


Usage Examples

Simple file locating example

Simple locate and search

Full quick mode 3-phase file report example

Express mode file report example

Customizing SLfile for new file patterns


Example

Example 1  -  Simple file locating

Simple CAUTIOUS mode use to locate a set of files.  The goal of this scenario is to locate all the DLL files in your WINDOWS directory and the subdirectories below it.  This scenario will answer the questions "how many Windows DLLs are on my system and how big are they?" .  You should be able to execute this scenario as described below.

a. On the "Main page" page, select the drive that contains your WINDOWS directory using the drive selection box that is right below the directory selection box in the upper left hand corner.  On most configurations, you will want to select the C: drive.

b. Browse through the directories on the selected drive by double clicking on directories to open them and expose the directories below them.

c. Once you find the WINDOWS directory, double click it to select it. You should notice that the selected drive and directory are reflected in the Edit control labelled "Locate files in drive and directory".

d. Alternatively you could have skipped steps a through c and directly entered the drive and directory in this edit if you knew the exact path that you needed.

e. Click on the tab labelled "Options" to expose the options page.

f. Ensure that "Subdirectory search" is selected.

g. Click on the down arrow at the right side of the control labelled "Mode of operation" and select CAUTIOUS mode from the list that drops down.

h. Click on the "Size + Date" tab and ensure that the "Ignore ..." options are selected for both size and date comparisons.  If necessary, click on the down arrows and select the ignore comparison option.

i. Click on the "Main" page tab so you can watch the file locate operation proceed.  You can actually start SLfile operation with any of the pages displayed, and you can switch pages at any time during operation.

j. Click on the locate button to start the identification of the matching files.  SLfile should find quite a few files.

k. Look at the "Count matching name:" and "Total size of matching files:" fields.

l. Click on the "File List" page tab and observe the matching files that were found.  All files that matched the locate phase criteria are listed here.

This completes this scenario.  This could also be done in QUICK mode with the same results if you ensure that the "Search for string(s)" buffer is empty.


Example

Example 2  -  Simple file locate and search

Quick mode use to locate files and search them for a string.   The goal of this scenario is to identify all Windows DLL files larger than 100,000 bytes that contain the word "error".

a. Enter the drive and directory for your Windows directory in the edit labelled "Locate files in drive and directory".  If you need to browse for the Windows directory use steps a through c of the previous example instead of this step a.

b. Enter the string "error" into the first line of the buffer labelled "Search for string(s)" .

c. Click on the tab labelled "Options" to expose the options page.

d. Ensure that "Subdirectory search" is selected.

e. Ensure that "One match per file" is selected.

f. Ensure that "Report line number" is selected.

g. Ensure that "Report match context" is selected.

h. Click on the down arrow at the right side of the control labelled "Mode of operation" and select QUICK mode from the list that drops down.

i. Click on the "Size + Date" tab and ensure that the "Ignore ..." option is selected for the date comparison.

j.  Click on the down arrow of the control labelled "File Size Comparison" and select the "File Larger or Equal To" comparison option.

k. In the edit control labelled "Size (bytes)", enter 100000.

l. Click on the "Main page" page tab so you can watch the file locate and search operation proceed.  You can actually start SLfile operation with any of the pages displayed, and you can switch pages at any time during operation.

m. On the main page, notice that the mode indicator shows "QUICK:" and that the "Subdir search" and "File + date limits" indicators both show "True".

n. Click on the locate button to start the identification of the matching files and search of each file found.  SLfile should find quite a few matching files.

o. Look at the "Count matching name:" and "Total size of matching files:" fields.

p. Click on the "File List" page tab and observe the matching files that were found.  All files that matched the locate phase criteria are listed here.  Those that were located but did not contain the string "error" have a minus sign at the beginning of the line.

q. Click on the "Results Buffer" page tab and observe the string match information that was recorded.  Since the DLL files are binary files, the context information surrounding the match is in the form of hexadecimal bytes.  If text files had been searched, ASCII text information would have been provided instead.

This completes this scenario.  This could also be done in EXPRESS mode with the same results if you ensure that the selected action type is "Do nothing!".


Example

Example 3  -  Quick mode 3-phase file report

Quick mode use to locate files and search them for a string and dump file descriptions for matching files.   The goal of this scenario is to identify all Windows DLL files larger than 100,000 bytes that contain the word "error" and then provide output that describes each of the files.  This adds a separate action phase to the previous scenario.

a. Execute steps a through n of scenario 2 to locate the matching Windows DLL files.

b. Click on the "File List" page tab and ensure the correct files are prepared for action.  In this scenario, you will just assume they are the correct files.  If this were a delete or move operation on your own files, for example, you might want to use this step to ensure that the correct files were selected.  In this step you can edit the file list manually to make any adjustments that might be necessary.

c. Click on the tab labelled "Action on Files" to expose the action selection page.

d. Click on the "Report file properties" action selection radio button. Be certain this is the selected action.  It will not affect the state of these important Windows files.  Other choices, like delete, move, or set attributes, could adversely affect your system.

e. Click on the "Main page" page tab so you can watch the file action operation proceed.  You can actually start SLfile operation with any of the pages displayed, and you can switch pages at any time during operation.

f. On the main page, notice that the mode indicator shows "QUICK:" and that the "Subdir search" and "File + date limits" indicators both show "True".

g. Click on the action button to start the processing the actions on the files in the file list.

h. Watch the actions proceed in the action status bar immediately above the locate, search, and action buttons.

i. Click on the "Results Buffer" page tab and observe that the properties of each matching file were recorded there.

This completes this scenario.  The use of QUICK mode allowed you to examine, and possibly edit, the file list to ensure that the correct files were acted on.


Example

Example 4  -  Express mode file report

Express mode use to locate files and search them for a string and dump file descriptions for matching files.   The goal of this scenario is to identify all Windows DLL files larger than 100,000 bytes that contain the word "error" and then provide output that describes each of the files.  This performs the same function as the previous scenario, but it uses express mode.

a. Enter the drive and directory for your Windows directory in the edit labelled "Locate files in drive and directory".  If you need to browse for the Windows directory use steps a through c of the first example instead of this step a.

b. Enter the string "error" into the first line of the buffer labelled "Search for string(s)" .

c. Click on the tab labelled "Options" to expose the options page.

d. Ensure that "Subdirectory search" is selected.

e. Ensure that "One match per file" is selected.

f. Ensure that "Report line number" is selected.

g. Ensure that "Report match context" is selected.

h. Click on the down arrow at the right side of the control labelled "Mode of operation" and select EXPRESS mode from the list that drops down.

i. Click on the "Size + Date" tab and ensure that the "Ignore ..." option is selected for the date comparison.

j.  Click on the down arrow of the control labelled "File Size Comparison" and select the "File Larger or Equal To" comparison option.

k. In the edit control labelled "Size (bytes)", enter 100000.

l. Click on the "Main page" page tab so you can watch the file locate, search, and action operations proceed.

m. On the main page, notice that the mode indicator shows "EXPRESS:" and that the "Subdir search" and "File + date limits" indicators both show "True".

n. Click on the locate button to start the identification of the matching files, the search of each file found, and the processing of each file that finds a match in the search phase.  You should see activity in the status bars for all three phases.  These status bars are located immediately above the locate, search, and action buttons.  SLfile should find and process quite a few matching files.

o. Click on the "Results Buffer" page tab and observe that the properties of each matching file were recorded there.

This completes this scenario.  The use of EXPRESS mode allowed SLfile to process each file as it was found and complete the activity in the minimum possible time.  This works well with safe actions such as reporting the file properties, but it is not recommended for file deletions, etc.


Example

Example 5  -  Customizing for file patterns

You can customize the predefined search file choices that are presented in the SLfile Main page:SearchParams] control labelled "Locate files matching pattern:".  These choices will then be presented in that combo box in future SLfile sessions.

Use the following steps to customize the choices:

a. Click on the Edit menu at the top of the screen.

b. Select the "Edit Search File Choices" option.

c. Click to position the cursor at the end of the first entry.

d. Hit the return key to insert a blank entry.

e. Type "Help files (*.hlp)".

f. Click on the button labelled "Ok".

g. Click on the down arrow on "Locate files matching pattern:".

h. Observe that the selections have changed.

The editing dialog also provides the option to return to the Original search file choices.