Freeware
Freeware
My Freeware

Shareware
Shareware
My Shareware
PCMag Utilities

Special Sections
Combined List
Reviews
Developer Tools

Resources
Web Sites
Newsletters
Newsgroups
Organizations
SIA Awards

Quick Links
gbAnimator
gbCase
gbCodeLib
gbSnippets
gbGallery
gbNavigate
gbOfficeTimer
gbPlot
gbRegistry
gbReplace
gbSIRTS
gbSnippets
gbStreet
gbText
gbVRML
gbWebCam
gbXML

GBIC >> Software >> gbSearch
gbSearch

gbSearch is a freeware utility for finding files which meet user-specified criteria. It provides over 125 different settings or actions which a user may employ to tailor a search, review the search results, and act on the matching files.

Searches may specify wild card file name patterns and may be constrained to one or more specified file extensions. Searches can also be constrained to return only files which contain specified search terms, or which meet specified date/size criteria.

A search may be limited to a single folder or may include subfolders.

While searches can find any type of file, special support is provided for text files, including an integrated text file viewer. Within the viewer, search terms can be highlighted. Or, the display can be limited to only lines which contain the search terms.

A significant feature of gbSearch is the ability to create a merge file - a text file containing the content of all files meeting the specified criteria. Merge files offer several unique advantages which make reviewing search results especially easy.

To install, simply unzip the installation file (gbsearch.zip) in a folder of your choice. In addition to the EXE, the installation includes gbSearch source code, the resource file, and image files.

Key Features

gbSearch provides a wide range of features, all focused on making it easier to find and manipulate information in text files.
  • Search subfolders
  • Find files matching specified dates/file sizes
  • Find files containing search terms
  • Integrated file Viewer/Editor
  • Highlight matching terms
  • Special support for text files
  • Merge located files
  • Duplicate file finder
  • Side-by-side file comparison
  • Create gbSnippets library from *.bas source files


Using gbSearch

Using gbSearch couldn't be simpler. From the toolbar, select the optional search criteria by pressing the appropriate toolbar buttons:
  1. file extensions to include in the search
  2. files within a date range
  3. files within a size range
  4. files containing search terms

Then just press the search button on the toolbar to see a list of files which match the criteria. Click on a file in the results list to view it in the integrated text file viewer, or double click on a file to open it with the local default client for that file type.

That's it!


User Interface

gbSearch allows the toolbar to be modified to reflect one of two search modes - restricted and unrestricted. In restricted mode, the toolbar provides several buttons which allows the user to easily constrain searches to a specified list of file extensions. The convenience comes at the cost of a wider toolbar.

In unrestricted mode, the user can still apply a similar constraint, but must do so by typing in the extension information to the file name filter. In unrestricted mode, the toolbar is somewhat narrower, which is preferred by some users.

UnRestricted Mode
While gbSearch features emphasize text files, searches can be made on any file type. In the "unrestricted" search mode, the gbSearch interface is simplified to this:

In unrestricted mode, the user can search for any file extension by entering the extension type in the Name Filter. This is discussed in more detail further down this page.

Restricted Mode
Whereas in "restricted" mode, gbSearch additionally displays the toolbar buttons which allow the user to specify text file extensions to include in the search. In this mode, only files which have the selected extensions will be returned from a search.

Optional GUI Elements
Regardless of whether the extension-specific toolbar buttons are displayed, the gbSearch interface may include two optional elements - a folder browser (left side) and a text file viewer (along the bottom). Both are shown in this image:



Toolbar

gbSearch's search commands are found in its toolbar (no menu is used). So going through it first will cover the main features of gbSearch.

Unrestricted Mode
In unrestricted search mode, the toolbar looks like this. It does not have the extension-specific buttons. Click the image to see a full-size version.

Restricted mode
Then, in restricted search mode (constrained to specified extension list), it looks like this. It includes the extension-specific buttons. Click the image to see a full-size version.

Extension-Specific Toolbar Buttons
Here's an image of the extension-specific buttons. An explanation of each is provided in the discussion below.

       

Toolbar Button Descriptions
Each of the toolbar buttons are described here.

    Folder Opens a dialog from which to select the base folder. This is an alternative to displaying the folder browser that was discussed above. The dropdown menu associated with this button is discussed below.
    Search Search for matching files. Using other toolbar buttons, the search may be constrained to files with selected extensions, those that fall within specific date/size ranges, or those that contain the search terms.
    Merge Creates a text file containing the content of all selected files. The file is named mergefile.txt, is stored in the gbSearch folder, and is automatically displayed in the file browser (if it is visible).

    This button provides a dropdown menu which will show a list of the drive letters currently available on the user's PC.

    Undo Restores the text editor to the last saved state. See the discussion further down this page for more information about the limited Undo capabilities of gbSearch.
    Explorer Toggles display of the integrated folder browser (Explorer)File Viewer.

    This button provides a dropdown menu which will show a list of the drive letters currently available on the user's PC.

    Viewer Toggles display of the integrated File Viewer. To view a file in the viewer, just click on the file name in the results list.
    All Includes files .bas/.inc/.txt extensions, as well as any extension found in the extension list, in searches. This does not mean that all extensions (such as EXE, DLL, ...) are included. To expand the search in that fashion, set the search mode to UnRestricted via the dropdown menu attached to the toolbar Settings button.
    .bas Includes files with .bas extensions in searches.
    .inc Includes files with .inc extensions in searches.
    .txt Includes files with .txt extensions in the search.
    List Includes files with any extensions found in the extension list (extensions.txt) in searches. A default list of extensions is provided. The list may be edited by the user via the button's dropdown menu.

    In addition to a menu item that opens the extension list for editing (opens the file "extensions.txt" in Notepad), the dropdown menu also lists all extensions found in the extensions list.

    Date Constrains searches to look for files within the date range. This button's dropdown menu allows the user to set the From: and To: dates, as well as to reset both date to the current date.
    Size Constrains searches to look for files within the size range. The size range may be changed using the button's dropdown menu. This button's dropdown menu allows the user to set the Min: and Max: file sizes.
    Terms Constrains searches to look for files containing the search terms. The button's dropdown menu can be used to adjust how search terms are used. The option are All (the file must contain all of the search terms), Any (the file must contain at least 1 of the search terms) or Complete String (the file must contain the exact sequence of search terms).
    Subfolders Enables searches to include subfolders of base folder
    Exact Match Forces case-sensitive searches when using search terms
    Settings Toggles display of text on the toolbar buttons. The next section discusses the settings available through this button's dropdown menu.
    Online Help Opens the gbSearch online Help page


Settings

The toolbar Settings button dropdown menu displays the following menu options:
    Display Toolbar Text Toggles the display of text under the toolbar icons
    Exact File Size Allows display of file size in the results list as bytes or kilobytes
    Colored Lines Displays alternating background line colors in the results list. This makes it easier for the users eyes to track a line as their eyes move across the page.
    Select Line Color Opens a color selection dialog for the color lines.
    AutoSize to Dialog Width Causes the columns of the results list to automatically adjust to the width of the main dialog.
    AutoSize to Data Causes the columns of the results list to automatically adjust to the width of the data in each column.
    AutoSize to Disabled Disables automatic adjustment of the results list columns.
    Line Numbers Adds lines numbers to the File Viewer. In the case of merged files with dividers, the file numbers start over for each file (at each divider).
    Dividers Enables the use of dividers when a merge file is created
    AutoOpen Automatically opens a merge file when it is created. The users default *.txt client is used.
    Include Hidden/System Files By default, Searches include normal files and folders. This option enables the search to detect both hidden and system files.
    Allow File Deletion As protection to the user, actions which delete files are inactive by default. This setting must be selected to enable the file deletion actions.
    Unrestricted Search Unrestricted search mode allows the search to detect all file extensions. A restricted search mode restricts the search to .bas/.inc/.txt file extensions, as well as those extensions found in the extensions list (extensions.txt).


Undo

The focus of gbSearch is on finding and viewing files which match the search criteria. However, the File Viewer does allow the user to edit the file content and then save the changes under the selected file name, or to a new file.

gbSearch does not provide Undo support for changes typed by the user within the File Viewer. At any time, however, the user can reload the currently displayed file by simply clicking on the filename in the ListView control.

Within the File Viewer context menu are almost 40 different commands which can modify the text within the File Viewer. Before each of these commands is executed, the content of the File Viewer is saved and may be restored using the toolbar Undo button. Once content is restored, the toolbar Undo button is grayed out to indicate that the content has been restored and that an Undo operation is no longer available.


Selecting a Starting Folder

gbSearch provide five ways to select the base folder.

  • Manual Entry
    The user may simply type in the base folder. gbSearch will alert the users if the entered folder does not exist.

  • Toolbar Open Folder Button
    The toolbar Folder button displays a dialog from which the base folder (where the search starts) may be selected.

  • Integrated Folder Explorer
    With the integrated Folder Explorer displayed, double-click on a folder to use it as the base folder.

  • Double-Click the "Base Folder" Label
    Each time the "Base Folder" label is double-clicked, the base folder is moved up one level from the current base folder setting.

  • Select Base Folder From MRU List
    Whenever a search is made, the current base folder is added to a list of previous search folders, and is then available from the dropdown list associated with the folders combobox.


Unrestricted File Search

When an unrestricted file search is enabled, all files extensions may be retrieved in a search. However, some constraints apply.

The search terms will be applied only to text files, where text files are defined files with .bas/.inc/.txt extensions and files whose extensions are found in the extensions list (extensions.txt).

The file viewer will display only files which gbSearch recognizes as text files.

When unrestricted searches are enabled, these toolbar buttons are removed from the toolbar:

       


Search Terms

Search terms may be used to select which files are returned by a search. The options which controls how the search terms are available by pressing the dropdown button next to the Terms toolbar button.

The dropdown button provides the following context menu options.

  • All
    Only files which contain all of the search terms will be returned by a search

  • Any
    Only files which contain at least one of the search terms will be returned by a search

  • Exact String
    The entire string, as entered into the Search Term(s) combobox, is treated as a single search term. Spaces are included as part of the search string.

Search terms are entered into the Search Term(s) combobox, separated by a space.

The use of double quotes to define a multi-word search term is not supported by gbSearch.

An additional toolbar button, "Match Case", can be used with search terms to provide case-sensitive searches.

Once a search term is used in a search, it is added to the search term dropdown list and may be selected for subsequent searches.


(File) Name Filter

The Name Filter in gbSearch is used differently, depending on whether a restricted or unrestricted search is made.

Unrestricted Search
In an unrestricted search, the Name Filter is used to define both the file name and the file extension. These examples should be familiar to most user:

     *.*
     *.bmp
     *.d*
     file??.txt

In unrestricted search, the Name Filter can also be used to define multiple patterns, as these examples demonstrate.

     *.txt;*.bak
     *.bmp;*.gif;*.ico/*.jpg
     gary*.doc;bob*.xls;henry*.ppt

Restricted Search
In a restricted search, the extension is set by pressing the appropriate toolbar extension buttons - .bas, .inc, .txt or the extension List. So in a restricted search , the Name Filter is used to describe only the file name - not the extension.

In the following examples, the file name patterns describe only the name, not the extension.

     *
     *tool*
     gb??

In a restricted search, gbSearch appends the Name Filter (up to the first . found in the string) to the selected extensions (.bas/.inc/.txt and extensions list) to create the complete search pattern used in the search.


Search Results List

The result of a search is a list of files meeting the search criteria (file extension, file name pattern, exact match, subfolders, search terms, date and size). The file name, file path, last date modified, file size, and extension are listed.

The results may be sorted on any of the columns of data by clicking on the column header.

Each line in the list contains a checkbox, which is checked by default. Various features in gbSearch act on only those files which are checked.

Over 25 actions may be taken on items within the results list. See the Context Menus section below for more details.

To view a file in the user's default text editor, double-click on a file in the search results list. A file may also be opened from the results list context menu.

To open a file in a specified text editor, select that option from the results list context menu. The context menu also provides an option to select the specified text editor.


Viewing Text Files

Files in the search results list may be viewed in three different ways - with the internal viewer/editor, with the default text editor on the user's PC, and with a specified client text editor.

Internal Viewer/Editor
Press the toolbar text file viewer button to display the built-in file viewer, which will be located at the bottom of the gbSearch main window. When the file viewer is displayed, clicking on a file in the search results list will display the file.

When the cursor is located in the File Viewer, the line number is placed in the left partition of the statusbar.

A splitter bar is located between the search results list (ListView control) and the built-in text file viewer (RichEdit control). Use the mouse to adjust the vertical size of the built-in text file viewer.

Navigation In File Viewer
When a file is displayed in the built-in file viewer, a user may highlight search terms and then move to the first/next/previous occurrences of the search terms.

To make it easier to view matching content, all lines which do not match the search criteria may be removed from the file viewer (keep matching lines).

Also, when a merge file is displayed in the File Viewer, menu options allow the user to move from one file (divider) to the next/previous one. Also from a merge file, a user can open whichever file the line at the cursor is from.

Navigation Symbols
In the left margin next to the file viewer are 4 symbols. Clicking on these symbols provides shortcuts to items from the file viewer context menu.

  • Up Arrow - find previous occurrence of a search term
  • Down Arrow - find next occurrence of a search term
  • Bulb - highlight all search terms
  • Lines - highlight all search terms and remove all lines which do not contain search terms


File Comparisons

Two types of file comparisons are supported.

Identify Duplicates of Selected File
gbSearch can identify (check) all files in the search results list which match a selected file. Just right mouse click on a file in the list and select the "Check Duplicates of Selected File". All non-duplicate files will be unselected.

Visually Compare Two Files
A visual comparison of two files is available. Simply select two files from the search results list and select the "Visually Compare Checked Files (2)" context menu option. This will automatically open the built-in file viewer and display content which shows the changes required to change the first marked file to the second marked file.

Text to remove is in red/strikeout. Text to be added is in blue. Text common to both files is in black.


Merge Files

A merge file is simply a concatenation of all the checked files currently in the results list, separated by an optional divider line. It looks like this:

     ==++==   c:\temp\test\file1.bas 
     ... content of file1.bas
     ==++==   c:\temp\test\file2.bas 
     ... content of file2.bas
     ==++==   c:\temp\test\file3.bas 
     ... content of file3.bas

The divider is optional. Also, the user can select which symbols are placed at the start of each divider line.

The concatenated text is saved to a file called mergefile.txt, located where the gbSearch EXE is installed. Once created, the merge file is displayed in the File Viewer, but the mergefile.txt file is not added to the results list.

A setting is available to open the merge file automatically, in the users .txt client application.

Merge File Features
Presenting the content of multiple files as a single listing makes it easier to browse through the results list. But gbSearch provides additional features which enhance the utility of merge files.

  • Find Search Terms
  • Highlight Search Terms
  • Display Only Matching Lines
  • Jump to Next/Previous File
  • Open File Containing Current Line
  • Reload Merge File
  • Open Merge File (Default Client)

These features are discussed in more detail in the Context Menu section below.

gbSnippets Library File
A special merge file option is also available - that of combining multiple files, formatted as a gbSnippets library file. This allows you to create source code libraries which can then be loaded into gbSnippets, with full access to the editing and execution capabilities it provides.

The new file is always call "gbsearch.gbs and is placed in the same folder where gbSearch is installed. The library file is automatically opened when created.


Context Menus

gbSearch does not have a main menu, as is often used by apps. Instead, the toolbar and control context menus provide the user with all available features.

ComboBox Context Menus
The base folder, file filter, and search term(s) are displayed in combobox controls. Each of these has a context menu:

    Base Folder Name Filter Search Term(s)

    Search List Context Menu
    Viewer Context Menu

Each of the context menu items are discussed below.

Search List Context Menu

  • Summary
    Display a brief summary of results list (file count, number files selected)
  • Remove All Items From List
    Clear the results list (and the file viewer also)
  • Check All Files
    Check all files in the results list
  • UnCheck All Files
    Remove the check from all files in the results list
  • Reverse Checks
    Reverse the check for all files in the results list
  • Remove Selected File From List
    Remove the selected file from the results list. Only one file may be selected at any time. The file is removed from the results list. It is not deleted from the hard drive.
  • Remove Checked Files From List
    Remove the checked files from the results list. The files are only removed from the list. The files are not deleted from the hard drive.
  • Remove UnChecked Files From List
    Remove the unchecked files from the results list. The files are only removed from the list. The files are not deleted from the hard drive.
  • Delete Selected File From Hard Drive
    Remove the selected file from the results list and from the hard drive.
  • Delete Checked Files From Hard Drive
    Remove the checked files from the results list and from the hard drive.
  • Use Selection As Base Folder
    Use the path of the currently selected file as the base folder. The path is placed in the Base Folder combobox.
  • Open Folder Containing Selection
    Open a window to the path of the selected file
  • Copy List of Checked Files To Clipboard
    Copy a list of all checked file to the clipboard. Only the full path of the checked files are included in the list (data from the name/date/size/ext are not included in the list).
  • Copy Checked Files to Working Folder
    Create a subfolder called "working", and copy all checked files to that folder. The original files are left alone. This provides a work space for the user to collect or modify the files for any purpose they chose.
  • Open Working Folder
    Open a window to the working folder path
  • Clear Working Folder
    Remove all files from the working folder. The folder itself is not deleted. If the user manually creates a subfolder within the working folder, files within that folder are not delete.
  • Check Duplicates of Selected File
    Each file in the results list is compared to the selected file. All matching files are checked. All non-matching files are unchecked.
  • Visually Compare Checked Files (2)
    Display (in the file viewer) a visual comparison of two files (the first two selected files in the results list. The display shows the changes required to change the first marked file to the second marked file. Text to remove is in red/strikeout. Text to be added is in blue. Text common to both files is in black
  • Open Selected Files (Default Client)
    Opens the selected file in the users default client application
  • Open Checked Files (Default Client)
    Attempts to open all checked files in the users default client application. It does so by providing a list of all selected files as a command line input to the client application.

    Note that not all clients accept multiple file names as command line inputs, so use of this option will depend on the capability of the users default client application.

  • Open Selected File (Specified Client)
    Opens the selected file in the specified client application
  • Open Checked Files (Specified Client)
    Attempts to open all checked files in the specified application. It does so by providing a list of all selected files as a command line input to the specified application.

    Note that not all applications accept multiple file names as command line inputs, so use of this option will depend on the capability of the specified application.

  • Specify Client
    Opens a file browser dialog from which to select an application that will be used where the "specified client" is to be used
  • Export to CSV
    Exports the results list to the file gbsearch.csv using a comma-delimited format. Data in each column of the results list are enclosed in double quotes and separated by commas.
  • Export to TXT (Full)
    Exports the results list to the file gbsearch.txt. Data in each column is separated by a default divider string of " ++ ".
  • Export to TXT (Simple)
    Exports the results list (Full Path column only) to the file gbsearch.txt.

Viewer Context Menu

  • Summary
    Display a brief summary of the content of viewer (lines/characters)
  • Cut
    Copy selected text to clipboard, then delete the selected text
  • Copy
    Copy selected text to clipboard
  • Paste
    Insert clipboard text content at the cursor
  • Delete
    Remove the selected text
  • Copy All
    Copy the entire content of the viewer to the clipboard
  • Find First Matching Line
    Locate the first occurrence, from the start of the document, of any search term
  • Find Next Matching Line
    Locate the next occurrence, from the cursor position, of any search term
  • Find Previous Matching Line
    Locate the previous occurrence, from the cursor position, of any search term
  • Next Divider
    Locate the next divider line, from the cursor position
  • Previous Divider
    Locate the previous divider, from the cursor position
  • Open File Containing Current Line
    Move to the previous divider line and open the file name found on that line
  • Highlight Terms
    Highlight all words in the viewer content which match any of the search terms
  • Remove Highlighting
    Remove highlighting from all words
  • Show Matching Lines Only
    Highlight all words in the viewer content which match any of the search terms, then remove all lines which do not contain a matching word
  • Sort Content Ascending
    Sort the entire content of the viewer in ascending order
  • Sort Content Descending
    Sort the entire content of the viewer in descending order
  • Save Content as Selected File Name
    Save the current file viewer content, as edited by the user, as the selected file name
  • Save Content As ...
    Save the current file viewer content, as edited by the user, to a file. A dialog is presented to allow the user to select the folder and file name to be used.
  • Reload Merge File
    Display the contents of the mergefile.txt file in the file viewer. That file will contain the contents as created by the last use of the "Create Merge File" command.
  • Open Merge File (Default Client)
    OPen the mergefile.txt file in the users default text file client application
  • Add Line Numbers
    Add line numbers to all lines (excluding merge file divider lines). The format used is 9 characters wide, a 6 digit number followed by 3 spaces. For example, "0000001 ".
  • Remove Line Numbers
    Delete the first 9 characters of all lines (excluding merge file divider lines)
  • Remove Dividers
    Remove all lines which start with the divider symbols, "==++==" by default, followed by 3 spaces
  • Remove Blank Lines
    Remove all blank lines. A line with only spaces is considered a blank line.
  • Remove Extra Spaces
    Replace all strings of more than 1 space with a single space
  • Upper Case
    Convert entire content (not just the current selection) of file viewer to upper case
  • Lower Case
    Convert entire content (not just the current selection) of file viewer to lower case
  • Trim Right/Left
    Remove leading/trailing spaces from all lines
  • Trim Left
    Remove leading spaces from all lines
  • Trim Right
    Remove trailing spaces from all lines
  • Insert 1 Column
    Insert a single leading space on all lines
  • Delete 1 Column
    Delete the first character from all lines
  • Insert 4 Columns
    Insert 4 leading spaces on all lines
  • Delete 4 Columns
    Delete the last 4 characters from all lines
  • Unique Lines (Sorted)
    Sort the entire content of the viewer, then remove all duplicate lines.
  • Word List
    Split the entire content of the viewer into a list of words, using the space character to define word separation. Create a sorted list of the results and remove all duplicate words.

Base Folder ComboBox

  • Cut
    Copy selected text to clipboard, then delete the selected text
  • Copy
    Copy selected text to clipboard
  • Paste
    Insert clipboard text content at the cursor
  • Up One Level
  • Clear Folder List
    Empty the base folder history list

Name Filter ComboBox

  • Cut
    Copy selected text to clipboard, then delete the selected text
  • Copy
    Copy selected text to clipboard
  • Paste
    Insert clipboard text content at the cursor
  • Clear Filter List
    Empty the name filter history list, then add the single entry "*"

Search Term ComboBox

  • Cut
    Copy selected text to clipboard, then delete the selected text
  • Copy
    Copy selected text to clipboard
  • Paste
    Insert clipboard text content at the cursor
  • Clear Search Term List
    Empty the search term history list

Other Comments

This sections contains miscellaneous additional information about using gbSearch.

INI File
gbSearch saves all of it's options in an INI file, which is placed in the same folder as the EXE.

Console
A DOS console may optionally be displayed, in which gbSearch will print the names of the internal functions, as they are executed. Additionally, for searches which use the search subfolders option, the list of folders searched will also be listed in the console.

While primarily a programmer's debug tool, users may find it interesting to see a list of the folders searched and of the procedures used when features are executed.

Comments and suggestions are welcome!