Copyright: Funduc Software, Inc. Help Ver 2.90D
Citation: Search & Replace for Win 3x 95/NT, Funduc Software, Inc. (www.funduc.com)


Ordering and Purchase Information
Funduc Software - Purchasing & Ordering Search and Replace for Windows

As part of the registration, you will also receive free updates and customer support (by E-MAIL) for six months. Updates are sent to registered customers quarterly. They incorporate your suggestions so please send them. If you have problems receiving the program or need customer support, contact us directly by E-MAIL at support@funduc.com. Quantity discounts are listed on the WWW at: http://www.funduc.com and on the order forms below.

Also see our web site for information on international versions of Search and Replace.

Credit Card Registration:  Several routes are available…

 Secure Internet Transaction:  If you have a secure Web browser such as Netscape or Internet Explorer, you may register by credit card via a secure Web transaction from our web site at:  http://www.funduc.com.

 Fax Registration:  You may register using a credit card via fax. Open and print the fax form and fax the completed order to (734) 462-1886. Please print clearly or type when you complete the form. You may also edit and print the file ORDER.TXT in the Search and Replace subdirectory. The cost through this option is $25/single user + $5 to $8 S&H if you want a diskette mailed. E-MAIL delivery is free. Please allow 7-10 days for postal orders to reach you, then contact us by E-MAIL at support@funduc.com if you did not receive the program. E-MAIL deliveries are sent within 2 business days. E-MAIL deliveries require that your mail system is able to receive MIME attachments.

 Phone Registration:  You can call (734) 462-1552 to order using a credit card. Specify that the order is for Search and Replace. The cost through this option is $25/single user + $5 to $8 S&H if you want a diskette mailed (E-MAIL delivery is free). Please allow 7-10 days for postal mail to reach you, then contact us by E-MAIL at support@funduc.com if you did not receive the program. E-MAIL deliveries are sent within 2 business days. E-MAIL deliveries require that your mail system is able to receive MIME attachments.

Ordering by check:  Note that check orders are discounted at a base price of $20 for a single user license (+$5 to $8 if you want a diskette mailed). To order by check, please open and print the order form. Please print clearly or type when you complete the form. You may also edit and print the file ORDER.TXT in the Search and Replace subdirectory. Mail the completed form and a check to Funduc Software Inc., P.O. Box 530904, Livonia, MI 48153.  Please allow 7-10 days for mail to reach you, then contact us by E-MAIL at support@funduc.com if you did not receive the program. Payments must be in US dollars drawn on a US bank or international postal money order in US dollars.

CompuServe Registration:  CompuServe subscribers may register by typing GO SWREG and using the Registration ID 7964. The cost for CompuServe orders is $25/user. CompuServe orders are filled by E-MAIL within 24-48 hours, regardless of delivery method selected. Therefore, please check your CompuServe mail a day or two after placing your order.


Search and Replace Mail Order Form
Search and Replace for Windows Mail Order

FUNDUC SOFTWARE, Inc.
Search and Replace for Windows Mail Order (Ver 2.90)

To place an order by mail, complete the form & a check and mail it to:

Funduc Software Inc.
P.O. Box 530904
Livonia,  MI 48153

Note:  Payments must be in US dollars drawn on a US bank or international postal money order in US dollars.

(Please print neatly or type)

License	* Price ($US) *	Quantity	Amount
1 to 9 computers	$ 20.00	_______	$_________
10 to 24 computers	$ 18.50	_______	$_________
25 to 49 computers	$ 17.50	_______	$_________
50+ computers	$ 15.00	_______	$_________
	* Note: Discount prices *
	Michigan residents add 6% sales tax	$_________
Preferred Shipping Method
	Mail 3.5 disk (US) $5 S&H	$_________
	Mail 3.5 disk (overseas) $8 S&H	$_________
	E-MAIL (Free)	$_______0_
		TOTAL PAYMENT	$_________
Your Name:	_________________________________
Street Address:	_________________________________
Street Address:	_________________________________
City, State, Zip:	_________________________________
Country:	__________________
Day Phone Number:	_______________________
Eve Phone Number:	_______________________
Fax Number:	_______________________
E-MAIL Address:	_________________________________
Date:	_______________

How did you find out about Search and Replace for Windows?

Comments:


Search and Replace Fax Order Form
Search and Replace for Windows Fax Order

FUNDUC SOFTWARE, Inc.
Search and Replace for Windows Fax Order (Ver 2.90)

To place an order by fax, print the form and fax it to (734) 462-1886

(Please print neatly or type)

License	Price ($US)	Quantity	Amount
Single computer	$ 25.00	_______	$_________
2 to 9 computers	$ 23.00	_______	$_________
10 to 24 computers	$ 21.00	_______	$_________
25 to 49 computers	$ 18.00	_______	$_________
50+ computers	$ 15.00	_______	$_________
	Michigan residents add 6% sales tax	$_________
Preferred Shipping Method
	Mail 3.5 disk (US) $5 S&H	$_________
	Mail 3.5 disk (overseas) $8 S&H	$_________
	E-MAIL (Free)	$_______0_
		TOTAL PAYMENT	$_________
Credit Card (Check One):	Visa[  ]	MasterCard[  ]
		American Express[  ]	Discover[  ]
Your name as it appears on your card:	______________________________
Credit Card Number:	_________________________________
Expiration Date:	__________________
Billing Address as it appears on your card:
Street Address:	_________________________________
Street Address:	_________________________________
City, State, Zip:	_________________________________
Country:	__________________
Day Phone Number:	__________________
Eve Phone Number:	_______________________
Fax Number:	_______________________
E-MAIL Address:	_________________________________
Authorized Signature:	____________________________________________
Date:	_______________
Comments:


Product Information
Funduc Software Product Information

Please visit our Web site at http://www.funduc.com for more information, freeware, shareware, and purchases of these and other products. Information about international versions of some of our products is also available at our web site.

      Directory Toolkit for Windows 95/NT

Directory Toolkit for Windows 95/NT is a multipurpose directory and file utility that provides features missing from Windows 95 and Windows NT 4.0 or higher. It displays single directory lists or side-by-side directory comparisons using color coding for alike, different, or missing files. Directory comparisons can be based on dates or a binary file analysis of actual file content. You can copy, move, & rename files while retaining long filenames and six built-in synchronize functions simplify updating directories. Built-in archive functions, with Explorer shell extensions, let you create & manage ZIP archives from Explorer and Directory Toolkit can serve as your primary archive manager for supported archives. File operations (copy, move, delete, rename) and directory comparison functions work seamlessly on files in archives, e.g., no need to manually extract files first. Other features include Explorer compatible OLE drag n Drop; Split/Concatenate files to/from diskettes; Encode/Decode UUENCODED, Base64(MIME), Binhex files (Decode also includes printable, 7 bit unencoded, & plain text); An integrated file comparison viewer for a color coded display of the actual differences in files; Safe physical sort of directories; Touch files (change time/date stamp); Find duplicate files on a drive; Open files and launch applications; Multiple include/exclude file masks and the ability to include/exclude files based on size and date; Command line switches to automate comparisons & synchronize operations via batch files; User configurable output file and print function to create reports of single and comparison directory lists; Automatically detects & runs (optionally) setup programs in archives; File numbering during rename, move, & copy operations that allow you to number files sequentially based on adjustable sort order and a user defined starting value. A complete German version and Japanese interface are available.

Directory Toolkit for Windows 95/NT was a July 1997 winner of of the WUGNET® Best Choice Shareware award for Windows 95 (www.wugnet.com) and was featured in the 8/20/97 issue of Lockergnome's Free Windows 95/NT E-zine (www.lockergnome.com).

      Search & Replace for Windows

Search and Replace for Windows 3.1, 95, NT is our award winning utility loved by programmers, webmasters, and novice computer users alike. If you need to find and replace text, or just find text, this utility is a must have.

Search and Replace looks through multiple files for a string and can also replace it with another string.  It can search subdirectories and ZIP files and do case sensitive or insensitive searches. Extensive support for regular expression (egrep) search & replacement includes operations that span more than one line, insertion of the path & filename during replacements, and incrementing number replacements.  Binary search & replace is also available.  You can specify multiple include & exclude file masks as well as filters based on file date & size.  Precise control over replacements is available through multiple confirmation options and a built-in context viewer that allows you to view replacements in-context before they are made.  An easily understood script editor makes frequent &/or complex multi-step search/replace operations a snap to prepare.  Script operations include a boolean expression evaluator that provides advanced decision making to determine which are processed by the script and full control over program options settings.  The internal context viewer includes a build-in editor for editing text files.  Other functions include: "Touch" files (change time/date stamp); Preservation of original file date during replacements; Replacements on backup path files instead of the originals; Output reports to monitor operations; Built-in editor for editing text files; Full compliment of command line switches; Shell extensions for the Win95/NT version to launch Search & Replace from Explorer and the Find Menu; and more. Separate executables for Win3x and Win95/NT and a detailed help file with examples are included. Complete German and Japanese versions and a French program interface are available.

Search and Replace has received awards from WUGNET (Windows User Group Net), - Pick of the Week for August 11 1996;  Windows Magazine (www.winmag.com) - Superior Shareware in the August 1996 issue;  ZD-NET - rated 4 stars;  TUCOWS (www.tucows.com) - rated 5 Cows, and a September 1997 WUGNET® Best Choice Shareware award for Windows NT (www.wugnet.com).

      Patch Creator

Patch Creator is a application for creating your own patches for updating registered versions of your software with this GUI program. It can create 16 or 32 bit patches, require password or not compressed or not and is self-contained. Files on users' machines can be updated from a specific version, added regardless of existing version, removed or renamed. Ideal for distribution needs and for shareware authors. Demo version creates patches without passwords.

    Shortcut Doctor

Shortcut Doctor checks your Windows 95/NT links/shortcuts and reports on those containing targets that can no longer be found. You'll probably be surprised at the number of "invalid" links on your computer. Shortcut Doctor can create new shortcuts, resolve invalid shortcuts, edit individual shortcuts, replace all shortcuts pointing to a certain drive or directory with another (after validation of new path is made), and delete shortcuts to the recycle bin. CD-ROM drives or network drives can be ignored and Network Drive mappings can be automatically inserted in Shortcut Doctor's Replace dialog. You can drag and drop shortcuts from Explorer onto Shortcut Doctor to edit them. Internet shortcuts such as those in the Internet Explorer Favorites list can also be created or edited. Shortcut Doctor has a handy output feature that routes results to a text file. The "Shortcut To" prefix and display colors can also be modified. Shortcut Doctor can also empty the Windows 95/NT Recent Documents list.

Decode/Encode DLLs

Decode/Encode DLLs integrate auto-decoding of UUENCODED, Base64(MIME), Binhex, XXENCODED, user table encoded and encoding(UUENCODED or Base64/MIME) in your Windows 3.1x, 95 or NT application. 16 and 32 bit DLLs are included, test programs are provided for C/C++ (MFC) and Visual Basic. One time fee provides a registered copy for royalty-free distribution with your applications and one year free customer support.

      Decode Windows 95 Shell Extension (freeware)

Decode Shell Extension (v3.1) allows you to decode Internet email attachments simply by right-clicking on a saved message file from Explorer and selecting Decode from the menu. The program supports multiple attachments, multi-part files (already concatenated), XXENCODED and User (table) encoded files in addition to UUENCODED, Base64(MIME), BinHex (Mac format), quoted-printable, and plain text files.

      HexView for Windows 95/NT (freeware)

HexView is a multiple document Hexadecimal viewer that can display, print, and print preview any file as a hex dump. It is intended as a supplement for Search and Replace for Windows, however, it is a standalone app and does not require Search and Replace. A Japanese version is available.

      INI to Registry (freeware)

INI to Registry will load the contents of any INI file and transfer it into the Windows 95/NT registry. That way programs that previously used INI files can read the old data from the registry. The INI to Registry utility was originally developed to allow users of Search and Replace to upgrade to versions of the software greater than 2.41 (for Windows 95 and NT) without losing their history. The program code is available for purchase.


Search and Replace Help Contents
     Search and Replace for Windows Help Contents - Version 2.90
                         Copyright 1995-1998 Funduc Software Inc.

Search and Replace for Windows 3.1, 95, NT is a search (grep) utility you can use to find one or more strings in multiple files, including files in ZIP archives. Replacements can be done using simple search-replace operations, regular expressions, and scripts. Please see the Feature List for an outline of the many functions available in Search and Replace.

Product Information Purchase Information  Shareware Information  License Information  Customer Support  Acknowledgments  International Versions  Funduc Software Products	Basic Operations Features List  Main Window  Program Options  Action Menu  Edit Menu  View Menu  Command Line Switches  About Dialog  Win95/NT Find Menu  Touch Files	How To Topics A Quick How-To Guide  Complex File Masks  Regular Expressions    Search Operators    Replacement Operators    Examples  Special Replace Operators  Script Operations  Binary Mode Editor  Special Characters  Add Lines to Files  Print & Save Search Results
Search & Replace Main Window


Search and Replace Feature Overview
Overview of Search and Replace Features

Search and Replace for Windows 3.1, 95, NT is a search (grep) utility you can use to find a string in multiple files, including files in ZIP archives. The registered version allows you to replace some, all, or none of the strings with another string. In the shareware version, you can only replace in the first file in each session. Here is a list of the basic features.

	Search and replace operations can be case sensitive or not, they can span multiple files via multiple file masks and filter settings, and they can span more than one line.
	Binary Mode search and replace lets you process binary files &/or text files with special characters such as tabs, line feed, carriage returns.
	Multiple include & exclude File Masks let you, for example, search all ".htm" & ".html" files except the ".htm" files begin with "s" or "t". You can also create Complex File Masks to include some subdirectories while excluding others. In addition, Filter Options allow you, for example, to include only files created after a set date that are smaller than the size you specify.
	Regular Expression operators include the basic grep-style substring and match operators, along with special replacement operators such as case change operators, file and path name replacements, counters, and binary mode operators.
	Incrementing counter operations let you allow you to quickly revise a sequence of numbers in one or more files or add numbers where no numbers exist originally.
	Scripts let you easily specify multiple search/replace combinations, save a particular search or replace string for later use, or process multiple drives/directories and/or file masks.
	Advanced Script Settings let you control program options, embed comments in scripts, and further specify the files processed during a script operation via a boolean expression evaluator.
	Replacements, including those in script and binary operations, can be visualized in context before they are made.
	User control over replacement prompts/warnings includes one string at a time, one file at a time, all at once (no warnings), and combinations in between such as skipping all remaining occurrences in a file (see Replace Options).
	Searching can be halted after the first hit in a file - useful for when you have to search large or many files (See Search Options).
	Write files changed by a replacement operation to a backup directory and preserve original file time/date stamps during replacements (see Replace Options).
	Add text to the top of a file or the end of the file (see Binary Mode Dialog).
	Insert the path & filename in replacements via Special Replacement Operators.
	Output in the Search & Replace "Results List" can be directed to your printer &/or saved to a text file.
	Internal context viewer allows you to edit text files (See Main Window). You can also launch a user configurable external viewer with optional special commands (see General Options), launch associated programs on "found" files and automatically view binary files using our freeware companion utility, HexView.
	Files &/or directories dropped from Explorer or File Manger into the Search & Replace main window are automatically recognized for processing. Just drag a file into the Search and Replace window!
	Launch Search and Replace from a program menu item on the Win95/NT Find Menu. Win95/NT Explorer shell extension lets you launch Search & Replace on a specific file or group of selected files.
	A full compliment of command line switches - ideal for power users.
	User configurable fonts & colors.
	Touch to change the date and time of the files you specify. Touch also allows you to set the file attribute bit (Archive, Read Only, Hidden, System).


Quick How-To Guide

Start a search: Enter (or select from the [image] combo boxes) a search string, one or more file masks, and a path. Then click the Search button. See Search and Replace Main Window for more information. ZIP files are searched by default. To configure that and many other items, see Program Options.

Use Special Characters or Multiple Lines in Search or Replace: Click the [image] button to the right of the Search or Replace String fields to use multiple lines or special characters in that field via the Binary Mode dialog. When you are done, the string "Binary mode -->>" is displayed on the main dialog. To view the string later, click the [image] button again.

Add Lines to the Beginning or End of Files: Enter a string to use in the Replace string field in the main dialog. Next, activate the Search String Binary Mode dialog ( [image] button and mark either "Add at top of file" or "Add at bottom of file". Click the "OK" button. Click the "Srch & Repl" button on the main dialog and the Replace string will be inserted according to your choice.

Set Up Include &/or Exclude File Masks: File masks follow the syntax of the DOS dir command (e.g., *.*;*.txt;*.doc;*.??1). More than one mask can be specified via a semicolon separator. Exclude masks use the ~ character to denote a mask NOT to search (e.g., *.*;~*.swp;~*.exe;~*.dll). To specify the ~ character as literal in a mask, use \~ (e.g., *.*;\~*.tmp). See File Masks for more information.

Start a replace (registered version only): Enter (or select from the [image] combo boxes) a search string, a replace string, one or more file masks and a path. Then click on the Search & Replace button. See Search and Replace Main dialog for more information.

Change Options: Click on the Options button or select Options from the View menu on the menu bar. Among the options you can change are the display colors, replacement prompts, a file (or printer) to write the output to, the number of items to save in the combo boxes, search filters, etc. See Options for more information.

View the Context of a Search Result: Double-click the Search Result or click the right (left for left-handers) mouse button and use the pop-up menu. The internal context viewer can only display text files. However, Search and Replace can automatically view binary files using our external utility, HexView for Windows 95/NT. The registered version allows you to edit the file using the internal context viewer.

Open a File Listed in Search Results: To open the file using the associated program, double-click the "Processing file..." line in the Search Results or click the right (left for left-handers) mouse button and use the pop-up menu.

Use Regular Expressions: Regular Expressions are supported for both Search and Replace (only one replace allowed in the shareware version). Enter an expression in the Search field, a counterpart expression in the Replace field (for a search & replace operation), and click on the Search (or Srch & Repl) button. See Regular Expressions for more information.

Use Scripts for Multiple Search and Replace strings or Paths: Click the "Script" button to activate the Script Dialog to process multiple Search/Replace strings, paths and file masks.

Use Command Line Parameters: See Command Line Parameters. For all practical purposes, only the Windows 95/NT version can be used from the command line.

Find Files only: Enter one or more file masks and a path. Do not enter a Search String (or blank it out). Then click on the Search button. See Search and Replace Main dialog for more information.

Touch Files: To Touch Files, enter (or select from the [image] combo boxes) one or more file masks and a path. Enter any filter options you desire to exclude files by file date &/or file size. The touch dialog will prompt you for the date, time, and file attributes to use for all the files described by your settings.

Search ZIP Files: Check the "Search ZIP files" field on the main screen to enable searches in PKZIP-compatible ZIP files that are present in the search path(s). Any files matching the file masks and filter options specified will be extracted to the extract path specified under Search Options and searched. This option is only available for Searches (not Replaces). ZIP searching may slow down operations so you turn it off if you do not need it. It is not necessary to specify *.zip on the file mask field to search ZIPs - simply check the box. See the section on ZIP Files for more information.

Write Search Results List to a File: The information in the Search Results area of the main dialog can be dumped to a text file by specifying a path & file to write the results to in the "Write Output to File" field under Output Options. The display options under the Output Options dialog are reflected in the output file, e.g., options such as whether filenames are included and the delimiters before &/or after search hits.

Print the Search Results List: To dump the contents of the Search Results area of the main window to your printer, go to Output Options and enter the phrase "Default Printer" (case insensitive, no quote characters) in the "Write Output to File" field. As with a dump to file (see above), the display settings under Output Options will be reflected in the printed output. Long lines will be wrapped. To turn off printing, return to Output Options, delete the string Default Printer from the "Write Output to File" field, and save the change by pressing the OK button.


Search and Replace Main Window
Search and Replace for Windows Main Window

Search and Replace for Windows allows you to search (and replace with another string if you wish) for a given string in a set of files on a path you specify. You can also use Search and Replace as a file finder by leaving the Search string blank and entering a file mask & path. The found strings and the files they are found in are clearly displayed in a list box using a customizable color (see General Options).

Click on the graphic below for help on the main window fields or scroll the screen down for a text description of the fields.

Details on the Mail Window Fields:

Search String field: Enter the string to search for in this field or select a previous search string from the combo list ( [image]). The search string you enter can be a simple search or a regular expression (be sure to check the 'Regular Expression' checkbox). To create a binary search using special characters, click the binary mode button to the right. The number of items saved in the combo lists is configurable in General Options. If you do not enter a Search String, the File Mask and Path fields will be used to execute a File Find, with the results displayed in the Search Results list.

Search String Binary Mode button ( [image]): Click this to use the Binary Mode dialog to create multiple line and/or special character Search Strings. When you are done creating a binary mode search string, "Binary mode -->>" is displayed on the main dialog. Binary mode strings will not be shown on the main screen. To view or edit the string, click the [image] button again to activate the binary dialog.

Replace String field: Enter the string to replace the search string with in this field or select a previous replace string from the combo list ( [image]). The string you enter can be a simple replacement, a regular expression (be sure to check the 'Regular Expression' checkbox), or a replacement involving special replacement operators. To create a binary replacement using special characters, click the binary mode button to the right of this field.

Replace String Binary Mode button ( [image]): Click this to use the Binary Mode dialog to create multiple line and/or special character Replace Strings. When you are done creating a binary mode Replace string, "Binary mode -->>" is displayed on the main dialog. To view or edit the string, later, click the button again.

File Mask field: Enter one or more include &/or exclude File Masks to specify the files &/or subdirectories to search. File and directory masks can be combined to create complex file mask expressions to include files in some subdirectories while excluding those in others. The wildcards characters * and ? may be used in a manner similar to the DOS dir command, e.g., *.*;*.txt;*.doc;*.??1. More than one mask can be specified by using a semicolon separator (see above). Exclude masks use the ~ character to denote a mask NOT to search (e.g., *.*;~*.swp;~*.exe;~*.dll). To specify a ~ character as part of the file mask, use \~ to denote the literal (e.g., *.*;\~*.tmp). If you have "Search ZIP Files" turned on, the mask will be applied to files inside of ZIPs as well as ordinary files in the path specified in the path field. Your last few search file masks are saved for you and you can find them in the combo box list ( [image]). See File Masks for more information.

File Mask Editor button ( [image]): Click this to activate the Include Exclude Files & Directories dialog. This dialog is used to help you generate complex mask expressions that will be inserted into the file mask field.

Path field: Enter the path where files to search reside. You may type it by hand, navigate to it by using the Browse button ( [image]), or select a previously used path from the combo list ( [image]). You can use Filters and Complex File Mask expressions to further specify which files in the path will be processed.

Path Browse button ( [image]): Click to select the path where files to search reside via the Select Path dialog. If the Path field (described above) contains a valid path, it will be your starting path in the Select Path dialog. Otherwise, the current path will be used.

Case sensitive field: Check this field if you want the search to be case sensitive. Uncheck it if you want to search regardless of case.

Search subdirectories field: Check this field to search all subdirectories of your path. Subdirectory searching will usually slow your search so turn it off if you only need to search the specified path.

Match Whole Word: Check this field to look for the exact word or phrase specified, meaning, enclosed by whitespace. For example, if this option is on and you look for "Window", the program will find it in the phrase "...use the Window menu..." but not in the phrase "...Windows 95...". If this option is not checked, both occurrences will be found.

Regular Expression field: Check this field if you want to use a Regular Expression. Case sensitive and binary mode may be used in conjunction with this type of search. When regular expression is enabled, the Match Whole Word function is not available.

Search ZIP Files field: Check this to search files inside ZIP files that exist in the specified path. When enabled, any PKZIP-compatible ZIP files present in the search path(s) will be examined and any files matching the file masks and filter options specified will be temporarily extracted to the extract path specified under Search Options and searched. This option is only available for Searches (not Replaces). This option may slow your searches, so you should turn it off if you do not need it. Note that it is not necessary to specify to *.zip on the file mask field to search ZIPs - simply check this box. Any file masks specified will be applied to files found inside of ZIPs. See the section on ZIP files for more information.

Search Results List: Your search results are displayed there. The information that is output to the Results list is configurable in Output Options, e.g., filenames, number of hits, hit lines, etc. The display colors of file names and strings found is configurable in General Options. If you're having trouble seeing the results, try changing the colors. Double clicking on a line where a search string is displayed will display the View Context screen. The Enter key also activates the context viewer (Win95/NT version only). Double clicking on a line that lists a filename will launch the executable associated with that file, if one exists (e.g., in File Manager). You can also use the right mouse button to display a menu or use the Ctrl+C key to copy the list box contents to the Clipboard.

Search button: Click this button to start a search.

Search and Replace button: Click this button to start a search and replace. We recommend that if you use this feature you also enter a backup path in the Options dialog (see Replace Options).

Options button: Click this button to display the Options dialog.

Script button: Click this button to activate the Script Editor.

Touch button: Click this button to Touch the files found by your file mask(s), path, and filter options settings. You will be prompted for a date, time, and file attributes to use for all the files.

About button: Click this button to view system, Ordering, and License information.

Exit button: Click this button to exit the application.


Search Path Explanation
Search Path

The search path is specified in the path field of Main Window or the Script Dialog. This is the upper level path where Search and Replace will begin search &/or replace operations. Use the file mask, filters, and advanced script settings to further specify which files will be processed.


Search Path Explanation (P)
Search Path:

The search path in specified in the path field of the Main Window or the Script Dialog. This is the upper level path where Search and Replace will begin search &/or replace operations. Use the file mask, filters, and advanced script settings to further specify which files will be processed.


Case Sensitive Flag
Case Sensitive Flag:

The Case Sensitive flags in the Main Window and the Script Editor determine whether Search & Replace will perform an exact case search (& replace). Note that if you want a replacement to be case sensitive, you must define a case sensitive search.


Match Whole Word
Match Whole Word Flag:

The Match Whole Word flags in the Main Window and the Script Editor determine whether Search & Replace will search for the exact word or phrase specified. A "whole word" is one that is enclosed by whitespace. For example, if this option is on and you look for "Window", the program will find it in the phrase "...use the Window menu..." but not in the phrase "...Windows 95...". If this option is not checked, both occurrences will be found. Note that Match Whole Word is not available when Regular Expressions are in use.


Search String
Search String:

Enter the string to search for in this field or select a previous string from the combo list ( [image]). The search string can be a simple search or a regular expression (be sure to check the 'Regular Expression' checkbox). To create a binary search using special characters, click the [image] button to the right of this field. If you create a Binary search, the string, "Binary mode -->>", is displayed in the search string field. If you do not enter a Search String, the file mask field, path field, and filter settings will be used to execute a File Find, with the results displayed in the Search Results list.

In the screen modeled here, we searched for the string "<body bgcolor="#FFFFFF"" across files of the filetypes *.htm and *.html (the file mask), in the path d:\example.

Note: When a Script is active, this field may change to reflect the script in place, e.g., "Use Script file: xxx", where xxx is the name of the script file.


Binary Editor
Binary Editor:

These buttons activate the Binary Mode dialog for the corresponding search & replace string fields. Binary Mode is used to search or replace across multiple lines or to enter special characters in the search or replace fields. If you create a string using binary mode input, "Binary mode -->>" is displayed on the respective Search &/or Replace string lines. To revise or check your entry, click on this button again.

If you are doing a Search & Replace operation, it is OK to have one component as a "binary mode" string and the other as a regular string (or even a blank string).

Note: If you have a search/replace where you want to span one or more lines but are not concerned with CR LF's or Tab's per se, consider using the *[] regular expression search operator.


Replace String
Replace String field:

Enter replacement string in this field or select a previous string from the combo list ( [image]). The string can be a simple replacement, a regular expression (be sure to check the 'Regular Expression' checkbox), or a replacement involving special replacement operators. To create a binary replacement using special characters, click the [image] button to the right of this field. If you create a Binary replacement, the string, "Binary mode -->>", is displayed in the replace string area.

It is also OK to have a replacement string here even though you're just doing a search. For example, the screen modeled here has a replace string "<body bgcolor="#FFFFFFF" entered even though the screen shot was generated from a search-only operation.

Note: When a script is active, this field may change to reflect the script in place, e.g., "Use Script file: xxx", where xxx is the name of the script file.


File Mask
File Mask field:

Enter one or more include &/or exclude File Masks to specify the files &/or subdirectories to search. File and directory masks can be combined to create complex file mask expressions to include files in some subdirectories while excluding those in others. The wildcards characters * and ? may be used in a manner similar to the DOS dir command, e.g., *.*;*.txt;*.doc;*.??1. More than one mask can be specified by using a semicolon separator (see above). Exclude masks use the ~ character to denote a mask NOT to search (e.g., *.*;~*.swp;~*.exe;~*.dll). To specify a ~ character as part of the file mask, use \~ to denote the literal (e.g., *.*;\~*.tmp). If you have "Search ZIP Files" turned on, the mask will be applied to files inside of ZIPs as well as ordinary files in the path specified in the path field. Your last few search file masks are saved for you and you can find them in the combo box list ( [image]). See File Masks for more information.

In the example here, the mask *.htm* will include all files that have a filename suffix ("filetype") involving .htm. For example, this mask would find the files file.htm, home.html, test.html, or weirdnamedfile.htmltxt.

Note: When a script is active, this field may change to reflect the script in place, e.g., "Use Script file: xxx", where xxx is the name of the script file.


Path Field
Path field:

Enter the path where files to search reside. You may type it by hand, navigate to it by using the Browse button ( [image]), or select a previously used path from the combo list ( [image]). You can use Filters and Complex File Mask expressions to further specify which files in the path will be processed.The path where files to search reside. You may type it by hand, navigate to it by using the path browser button ( [image]), or select a previously used path from the combo list ( [image]). Note that to search subdirectories under the path, click on the Search Subdirectories checkbox.


Path Browse Button
Path Browse Button:

Click this to navigate to the desired path via the Path Browser.


Case Sensitive Search Field
Case Sensitive field:

Check this if you want the search to be case sensitive. Uncheck it if you want to search regardless of case. Note that if you want a replacement to be case sensitive, you must define a case sensitive search.


Search Subdirectories Field
Search Subdirectories field:

Check this to search all subdirectories under the path you defined. Note that searching subdirectories will usually slow your search since more files will be processed. Uncheck it if you just want to search the specified path.


Match Whole Word Field
Match Whole Word field:

Check this to search for the exact word or phrase specified, meaning, it is enclosed by whitespace. For example, if this option is on and you look for "Window", the program will find it in the phrase "...use the Window menu..." but not in the phrase "...Windows 95...". If this option is not checked, both occurrences will be found.


Regular Expression Field
Regular Expression field:

Check this field if you want to use a Regular Expression. Case sensitive and binary mode may be used in conjunction with this type of search. When regular expression is enabled, the Match Whole Word function is not available.


Search ZIPs Field
Search ZIP Files field:

Check this to search files inside ZIP files that exist in the specified path. When enabled, any PKZIP-compatible ZIP files present in the search path(s) will be examined and any files matching the file masks and filter options specified will be temporarily extracted to the extract path specified under Search Options and searched. This option is only available for Searches (not Replaces). This option may slow your searches, so you should turn it off if you do not need it. Note that it is not necessary to specify to *.zip on the file mask field to search ZIPs - simply check this box. Any file masks specified will be applied to files found inside of ZIPs. See the section on ZIP files for more information.


Drop Down List
Drop Down Lists:

Search and Replace saves your last few choices in the respective input areas to the left of the selection lists. Click here to activate the lists. The number of items saved is configured in General Options.


File Mask Browser
File Mask Editor:

Activates the Include/Exclude Files & Directories dialog, which you can use to assist you in constructing complex file masks.


Path Browser
Path Browser:

Click here to activate a path selection dialog. See Select Path Dialog for more information.


Search Button
Search button:

Click this button to start a search. You can also initiate a search by pressing Enter when the focus is in the Search Results list or the Search String, Replace String, Path, & Mask fields.


Search & Replace Button
Search and Replace button:

Click this button to begin a search & replace operation. Depending on your settings in Replace Options, you will be prompted before confirmations. We recommend that if you use this feature you also enter a backup path in the Replace Options.


Options Button
Options button: Click this button to display the Options Dialog.


Touch Button
Touch button:

Click this button to Touch the files found by your file mask(s), path, and filter options settings. You will be prompted for a date, time, and file attributes to use for all the files described by your settings.


Touch Button
Script button: Click this button to activate the Script Editor.


About Button
About button: Click this button to view system information, Ordering Information and License Information.


Exit Button
Exit button: Click this to exit Search and Replace for Windows.


Search Results List
Search Results List:

Your search results are displayed here. The information that is output to the Results list is configurable in Output Options, e.g., filenames, number of hits, hit lines, etc. The display colors are configurable in General Options. If you are having trouble seeing the results, try changing the colors.

In the model screen here, the right click menu available in the results list was captured for purposes of an example (lower right corner). Normally, this is not displayed until you right click on a file or search results line.

To activate the View Context dialog, select either View Context from the right click menu or double click on a line where the search string is displayed. The Enter key also activates the context viewer (Win95/NT version only). If you double click (or press Enter) on the highlighted line in the current example (Line 22 - …), the view context dialog would be displayed with the search string highlighted.

To "Shell to" (launch) the executable associated with a file (in File Manager), double click on a filename line. In the example screen, to activate the web browser associated with .htm files, double click on the line immediately above the highlighted line, e.g., the line that says, "Processing file: D:\EXAMPLE\Search(grep) and Replace for.htm".

The Ctrl+C key will copy the entire contents of Search Results list box to the Windows Clipboard.


Right Click Menu
Right Click View Context Menu:

To display this menu, right click on a file or search results line. Left click if your mouse is set up for left-handed. The View Context menu allows you several choices for viewing the results. The items are the same as those in the upper portion of the Search and Replace View Menu.


Associated Viewer
Open with Associated Viewer:

This right click menu item opens the current file using the associated viewer (program). If there is no file association established on your computer for the highlighted file, the default viewer, configurable in General Options, is used (default is NOTEPAD.EXE). The file to open is determined by the focus in the Search Results list, which is marked by a thin rectangle or a highlight. Open with Associated Viewer is not available if the Search Results is empty.

In the current example, "Open with Associated Viewer" would launch the web browser associated with .htm files.

Note: If the file is in a ZIP file, it is extracted to a subdirectory specified in Search Options. If you edit a file in a ZIP, you must use your ZIP utility to update the ZIP as Search and Replace does not update changes to ZIPs. If you need a ZIP utility, check out our own Directory Toolkit for Windows95/NT.


Default Viewer
Open with Default Viewer:

This right click menu item will launch the Search & Replace default viewer (configurable in General Options). NOTEPAD.EXE is used if no default viewer has been defined. The file to open is determined by the focus in the Search Results list, which is marked by a thin rectangle or a highlight. Open with Default Viewer is not available if the Search Results is empty.

Note: If the file is in a ZIP file, it is extracted to a subdirectory of the path specified in Search Options. If you edit a file in a ZIP, you must use your ZIP utility to update the ZIP as Search and Replace does not update changes to ZIPs. If you need a ZIP utility, check out our own Directory Toolkit for Windows95/NT.


Open With
Open with...:

This right click menu item open the current file using a viewer of your choice. A Select Viewer dialog will allow you to select the viewer to use. This item is not available if the Search Results list is empty or if the focus is on a filename line.


View Context
View Context:

This right click menu activates the Search & Replace internal context viewer. The highlighted file will be opened at the point of the found search string and the string will be highlighted. The highlight color, number of lines displayed in the context viewer, and viewer font are configurable in General Options. If the Search Results list contains nothing or if you have the focus on a filename line, View Context is not available.

In example screen here, the file D:\EXAMPLE\Search(grep) and Replace for.htm would be displayed in the context viewer at line 22.

Note: The context viewer displays text only. However, the Win 95/NT version of Search and Replace will automatically detect binary files and launch our freeware companion utility, HexView, which can display and print any file as a hex dump. HexView can be downloaded from our web site at http://www.funduc.com.

Note: If the file is in a ZIP file, it is extracted to a subdirectory of the path specified in Search Options. If you edit it, you must use your ZIP utility to update the ZIP since ZIP files are NOT automatically updated.

See View Context Dialog for more information.


File Menu
Actions Menu:

Search: Starts a search.

Search and Replace: Starts a search and replace. See Replace Options to set a backup path & replacement prompting.

Touch: See "Touch Files" to change the time & date stamp of the files found using the file mask(s), path, and filter options settings.

Exit: Exit Search and Replace.


Edit Menu
Edit Menu:

Copy Search Results: Copy the Search Results (if any) to the clipboard.


View Menu
View Menu:

(See View Menu for more info)

Open with Associated Viewer: Opens the highlighted file using the associated viewer (program) for your computer.

Open with Default Viewer: Opens the highlighted file using the Search and Replace default viewer (configurable in General Options). Default is NOTEPAD.EXE.

Open with...: Opens the highlighted file using a viewer of your choice, selected via the Select Viewer dialog.

View Context: Views the highlighted line in the Search Results (if any) using the Search and Replace internal context viewer.

Script: Displays the Script Editor.

Options: Display & modify Program Options.


Help Menu
Help Menu: Activates Search & Replace help.


Copy Results to Clipboard
Copy to Search Results to Clipboard: Selecting this from the right click menu is the same as pressing CTRL-C anywhere in the Search Results list. The contents of the list are copied as text into the clipboard.


Actions Menu

The Search and Replace Actions Menu has the following items:

Search: Select this to start a search.

Search and Replace: Select this to start a search and replace. We recommend that if you use this feature you also enter a backup path in the Replace Options dialog.

Touch: Select this item to Touch the files found by your file mask(s), path, and filter options settings. You will be prompted for a date, time, and file attributes to use for all the files described by your settings.

Exit: Select this to exit Search and Replace.


Edit Menu

The Search and Replace Edit Menu has the following item:

Copy Search Results: Select this to copy the Search Results (if any) to the clipboard. If the Search Results list contains nothing, this item is not available.


View Menu

The Search and Replace View Menu has the following items:

Open with Associated Viewer: This opens the current file in the Search Results (if any) using the associated viewer (program). If no viewer is associated with that file extension, the default viewer, configurable in General Options, is used (default is NOTEPAD.EXE). The file to open is determined by the focus in the Search Results list, which is marked by a thin rectangle or a highlight. If the Search Results list contains nothing, this item is not available. If the file is in a ZIP file, it is extracted to a subdirectory of the path specified in Search Options. If you edit a file that was in a ZIP, you must update the original ZIP file using your ZIP utility since ZIP files are NOT automatically updated. See Product Information for details about Directory Toolkit for Windows 95/NT, our multipurpose file and directory utility with built-in ZIP functions.

Open with Default Viewer: This opens the current file in the Search Results (if any) using the Search and Replace default viewer, configurable in General Options. NOTEPAD.EXE is used if no default viewer has been defined. The file to open is determined by the focus in the Search Results list, which is marked by a thin rectangle or a highlight. The Default Viewer menu item is not available if the Search Results list is empty. If the file is in a ZIP file, it is extracted to a subdirectory of the path specified in Search Options. If you edit a file contained in a ZIP you must update the original ZIP using your ZIP utility as ZIPs are NOT automatically updated.

The command line for the Search and Replace Default Viewer will pass the keywords, %line% and %path%, for the line number of the highlighted found string in the Search Results list and the complete path to the file containing that string. These keywords can be useful if your viewer supports command line switches to open a file at a specific line number. For example, if your viewer supports specification of a line number, you would make a setting under the "If no association use:" field in General Options of something like, "C:\Windows\SuperView.exe %path%(%line%)" to launch "SuperView" and move automatically to the line containing the string highlighted in the Search & Replace Results list. Consult the documentation for your viewer or editor for details on command line syntax. Note: If the filename itself is highlighted in the Search Results list, a value of 1 is passed for %line%.

Open with...: This opens the current file in the Search Results (if any) using a viewer of your choice. A Select Viewer dialog allows you to select the viewer to use. The file to open is determined by the focus in the Search Results list, which is marked by a thin rectangle or a highlight. This item is not available if the Search Results list contains is empty. If the file is in a ZIP file, it is extracted to a subdirectory of the path specified in the Search Options tab. If you edit a file that was in a ZIP, you must update the original ZIP using your ZIP utility since ZIP files are NOT automatically updated. If you need a ZIP utility, please try our program, Directory Toolkit.

View Context: Select this to view the current line in the Search Results (if any) and several lines before and after it using the Search and Replace internal context viewer. The file to open is determined by the focus in the Search Results list, which is marked by a thin rectangle or a highlight. This item is not available if the Search Results list is empty or if the focus on a filename line. Note that the Search and Replace context viewer displays text only. However, Search & Replace automatically detects binary files and launches our freeware application, HexView for Windows 95/NT, in order to view the context of binary files. See Product Information for details on HexView. Finally, note that if the results context is a file inside a ZIP file, it is extracted to a subdirectory of the path specified in Search Options. If you edit it, you must update the original ZIP using your ZIP utility since ZIP files are NOT automatically updated. See the View Context dialog for more information about viewing the context of search finds.

Note: When the focus (highlight) in the Search Results list is on a found string, double clicking with your mouse will also activate the context viewer. For the Win95/NT version of Search & Replace (SR32), the Enter key also activates the context viewer.

Script: Select this item to display the Script Editor.

Options: Select this item to display the Options dialog.


Case Sensitive Flag
Case Sensitive Flags

The Case Sensitive flags in the Main Window and the Script Editor determine whether Search & Replace will perform an exact case search (& replace). Note that if you want a replacement to be case sensitive, you must define a case sensitive search.


Match Whole Word
Match Whole Word Flags

The Match Whole Word flags in the Main Window and the Script Editor determine whether Search & Replace will search for the exact word or phrase specified. A "whole word" is one that is enclosed by whitespace. For example, if this option is on and you search for "Window", the program will find it in the phrase "...use the Window menu..." but not in the phrase "...Windows 95...". If this option is not checked, both occurrences will be found. Note that Match Whole Word is not available when Regular Expressions are in use.


File Masks
File Masks: Include & Exclude Masks

File Masks are file and directory name filters, which, in conjunction with the search path, size & date filters, and advanced script settings, define the files Search and Replace will operate on. File and directory masks can be combined to create complex file mask expressions to include files in some subdirectories while excluding those in others. The wildcards characters * and ? may be used in a manner similar to the DOS dir command, e.g., *.*;*.txt;*.doc;*.??1. More than one mask can be specified by using a semicolon separator (see above).

If you have "Search ZIP Files" turned on, the mask will be applied to files inside of ZIPs as well as ordinary files in the path specified in the path field on the main screen. Be sure not have any blank spaces between the semicolon(s) and the mask(s).

Search and Replace saves your last few file masks in the combo box list ( [image]) to the right of the File Mask field.

Include Masks: These are the masks as outlined above. For example, to include all files of the filetype .html in a search, you would use the mask *.html. Of note, if you wanted to also include .htm files, you could use the mask *.htm* or use a semicolon separator and create two masks, *.html;*.htm. See complex file masks for help on adding mask expressions involving subdirectories.

Exclude Masks: the ~ character denotes a mask NOT to search. For example, if you wanted to exclude all .exe and .dll files from your search, you would use the mask *.*;~*.exe;*.dll. Here, all files but .exe and .dll files would be included. Note the use of the semicolon separators. See complex file masks for help on adding mask expressions involving subdirectories.

To specify the ~ character as an explicit part of a filename, use \~ to denote the literal. For example, a mask to include the files named ~1.txt and ~2.txt would be \~*.txt. To create an exclude mask for those files, use the mask, ~\~*.txt.


File Masks
File Masks:

File Masks are file name filters, which, in conjunction with the search path, filters, and any advanced script settings, define the files Search and Replace will operate on. File masks and wildcards can also be files and subdirectory names to create complex file mask expressions that include files in some subdirectories while excluding those in others. The mask wildcards characters of * and ? are those used in the DOS dir command, e.g., *.*;*.txt;*.doc;*.??1. More than one mask can be specified by using a semicolon separator (see above).

If you have "Search ZIP Files" turned on, the mask will be applied to files inside of ZIPs as well as ordinary files in the path specified in the path field on the main screen. Be sure not have any blank spaces between the semicolon(s) and the mask(s).

Search and Replace saves your last few file masks in the combo box list ( [image]) to the right of the File Mask field.

Include Masks: These are the masks as outlined above. For example, to include all files of the filetype .html in a search, you would use the mask *.html. Of note, if you wanted to also include .htm files, you could use the mask *.htm* or use a semicolon separator and create two masks, *.html;*.htm. See complex file masks for help on adding mask expressions involving subdirectories.

Exclude Masks: the ~ character denotes a mask NOT to search. For example, if you wanted to exclude all .exe and .dll files from your search, you would use the mask *.*;~*.exe;*.dll. Here, all files but .exe and .dll files would be included. Note the use of the semicolon separators. See complex file masks for help on adding mask expressions involving subdirectories.

To specify the ~ character as an explicit part of a filename, use \~ to denote the literal. For example, a mask to include the files named ~1.txt and ~2.txt would be \~*.txt. To create an exclude mask for those files, use the mask, ~\~*.txt.


Include/Exclude Mask Builder
Include/Exclude Files & Directories

The Include/Exclude Files and Directories dialog is activated from the [image] button next to the File Mask fields in the main window and the script dialog. This editor is used to construct complex expressions to insert in the file mask fields. These expressions allow you to further specify which subdirectories and files under the search path to include (or exclude) from your search &/or replace. For example, it is possible to exclude files of one type in some subdirectories while including files of the same type if they reside in other subdirectories. You may use the * and ? wildcards as in the DOS dir command to refer to subdirectories.

 To enable complex Include/Exclude masks, be sure to turn on the "Search Subdirectories" field in the Main Window or the Advanced Script dialog!

Click on the graphic below for help on the main window fields or scroll the screen down for a text description of the fields and additional notes.

Details on the Include/Exclude Files and Directories dialog

Include Exclude Mask List: The list of masks that will be inserted into the mask field when you click the OK button. Each expression here will be combined as a single expression separated by semi-colons.

Include Exclude Mask Buttons:

Up Button: Moves the highlighted mask in the Include/Exclude list up one step.

Down Button: Moves the highlighted mask in the Include/Exclude list down one step.

Apply Button: Creates a mask in the Include/Exclude list for the data listed in the fields on the right side of the dialog.

Add Button: Creates a new blank mask at the bottom of the Include/Exclude Mask list.

Insert Button: Inserts a blank mask in the Include/Exclude list above the highlighted line.

Delete Button: Deletes the highlighted mask in the Include/Exclude list.

Include Field: Mark this to have the data in the other fields to the right of the dialog be an "include" mask.

Exclude Field: Mark this to have the data in the other fields to the right of the dialog be an "exclude" mask.

Files Matching Field: Enter either a specific filename or a wild card expression to use. The wildcard operators are the same as the DOS dir command, e.g., the ? and * characters may be used. "Files Matching" may be used alone to specify a general include or exclude file mask or it may be combined with data involving the "Directories Matching" field below to identify files in some directories but not others.

Directories Matching Field: Enter a directory name or a wildcard specified directory name to use. The wildcard operators are the same as the DOS dir command, e.g., the ? and * characters may be used.

All Field: Mark this to use only the data in the "Files Matching" field. The "All" field is mutually exclusive with the "Use Match" field. To use data in your mask from both the "Files Matching" and "Directories Matching", mark the "Use Match" field.

Use Match Field: Mark this to use an expression involving a subdirectory name specified in the "Directories Matching" field. The "Use Match" field is mutually exclusive with the "All" field. To use data in your mask from both the "Files Matching" and "Directories Matching", mark the "Use Match" field.

Any Number of Levels Under Start Directory Field:

a) Leave this unmarked to include (or exclude) the directory specified in the "Directories Matching" field that exists immediately under the start path directory. For example, given the staring path c:\test\, the expression ~\skip_me\ would skip the files in c:\test\skip_me\. However, files in c:\test\more\skip_me\ or c:\test\skip_me\test2\ would be processed. To also skip files in subdirectores under c:\test\skip_me\test2\, turn on the "Also Process Subdirectories" field.

b) Mark this to include (or exclude) the directory specified in the "Directories Matching" field no matter how many levels below the start path directory it exists. For example, the expression ~\*\skip_me\ would exclude the files in c:\test\skip_me\ and c:\test\more\skip_me\. Files in subdirectories under c:\test\skip_me\ and c:\test\more\skip_me\ that are not named "skip_me" would be processed, e.g., c:\test\more\skip_me\more2. To also skip files in 'more2', turn on the that "Also Process Subdirectories" field.

Also Process Subdirectories Field: Mark this field to include (or exclude) subdirectories below the directory specified in the "Directories Matching" field. For example, given the start path c:\test\ and the expression ~\skip_me\*\, all subdirectories under c:\test\skip_me\ would be excluded. Note that if "Also Process Subdirectories" was not checked (e.g., an expression such as ~\skip_me\), files in c:\test\skip_me\ would be excluded but files in c:\test\skip_me\test2\ would be included.

OK Button: Inserts the items in the mask list into the File Mask field in the main dialog.

Cancel Button: Quits the dialog without making changes.

Help Button: This will probably activate the online help :-).

Notes:

 To enable complex Include/Exclude masks, be sure to turn on the "Search Subdirectories" field in the Main Window or the Advanced Script dialog!

 The rules for complex masks are perhaps best understood by example. We suggest use the below chart as a guide and experiment with the dialog on temporary data before using complex masks on critical data.

Expression	Effect
*.*;~\images\	skip files in the images subdir right below the start path
*.*;~\images\*\	as above but also skips subdirs under images
*.*;~\*\images\*\	skips files in any subdir named images
*.*;~\*\images\*.jpg	skips .JPG files in an images subdir any # of levels below the start path
*.*;~\	skips files in the root
*.*;~\images\test\	skips files in images\test
*.*;~\images\te*\	uses a wildcard (te*) to skip images\test, images\testing, etc.
*.htm;~\*\_vti*\*\	uses wildcards to skip all the Front Page 98 work subdirs in a Front Page web.


Include Exclude Masks Item 1
Include Exclude Mask List Item1:

If this expression was highlighted, the string *.htm* would be visible in the "Files Matching" field to the right of the dialog. The "Include" and "All" radio buttons would be on.


Include Exclude Masks Item 2
Include Exclude Mask List Item2:

The expression here makes use of the * wildcard operator to exclude all files in all subdirectories in all levels below the start path that begin with the string "_vti". When a specific file mask is not specified, *.* is assumed. For example, the subdirectory mask here, *.htm;~\*\_vti*\*\, is equivalent to *.htm;~\*\_vti*\*\*.*.


Include Exclude Masks Item 3
Include Exclude Mask List:

The list of masks that will be inserted into the mask field when you click the OK button. Each expression here will be combined as a single expression separated by semi-colons.


Up Button
Up Button:

Moves the highlighted mask in the Include/Exclude list up one step.


Down Button
Down Button:

Moves the highlighted mask in the Include/Exclude list down one step.


Apply Button
Apply Button:

Creates a mask in the Include/Exclude list for the data listed in the fields on the right side of the dialog.


Add Button
Add Button:

Creates a new blank mask at the bottom of the Include/Exclude Mask list.


Insert Button
Insert Button:

Inserts a blank mask in the Include/Exclude list above the highlighted line.


Delete Button
Delete Button:

Deletes the highlighted mask in the Include/Exclude list.


Include Field
Include Field:

Mark this to have the data in the other fields to the right of the dialog be an "include" mask.


Exclude Field
Exclude Field:

Mark this to have the data in the other fields to the right of the dialog be an "exclude" mask.


Files Field
Files Matching Field:

Enter either a specific filename or a wild card expression to use. The wildcard operators are the same as the DOS dir command, e.g., the ? and * characters may be used. "Files Matching" may be used alone to specify a general include or exclude file mask or it may be combined with data involving the "Directories Matching" field below to identify files in some directories but not others.


Directories Matching Field
Directories Matching Field:

Enter a directory name or a wildcard specified directory name to use. The wildcard operators are the same as the DOS dir command, e.g., the ? and * characters may be used.


Directories  All Field
All Field:

Mark this to use only the data in the "Files Matching" field. The "All" field is mutually exclusive with the "Use Match" field. To use data in your mask from both the "Files Matching" and "Directories Matching", mark the "Use Match" field.


Directories Use Match Field
Use Match Field:

Mark this to use an expression involving a subdirectory name specified in the "Directories Matching" field. The "Use Match" field is mutually exclusive with the "All" field. To use data in your mask from both the "Files Matching" and "Directories Matching", mark the "Use Match" field.


Directories Any Levels Field
Any Number of Levels Under Start Directory Field:

a) Leave this unmarked to include (or exclude) the directory specified in the "Directories Matching" field that exists immediately under the start path directory. For example, given the staring path c:\test\, the expression ~\skip_me\ would skip the files in c:\test\skip_me\. However, files in c:\test\more\skip_me\ or c:\test\skip_me\test2\ would be processed. To also skip files in subdirectores under c:\test\skip_me\test2\, turn on the "Also Process Subdirectories" field.

b) Mark this to include (or exclude) the directory specified in the "Directories Matching" field no matter how many levels below the start path directory it exists. For example, the expression ~\*\skip_me\ would exclude the files in c:\test\skip_me\ and c:\test\more\skip_me\. Files in subdirectories under c:\test\skip_me\ and c:\test\more\skip_me\ that are not named "skip_me" would be processed, e.g., c:\test\more\skip_me\more2. To also skip files in 'more2', turn on the that "Also Process Subdirectories" field.


Directories Process Subdirectories Field
Also Process Subdirectories Field:

Mark this field to include (or exclude) subdirectories below the directory specified in the "Directories Matching" field. For example, given the start path c:\test\ and the expression ~\skip_me\*\, all subdirectories under c:\test\skip_me\ would be excluded. Note that if "Also Process Subdirectories" was not checked (e.g., an expression such as ~\skip_me\), files in c:\test\skip_me\ would be excluded but files in c:\test\skip_me\test2\ would be included.


Include Exclude OK Button
OK Button:

Inserts the items in the mask list into the File Mask field in the main dialog.


Include Exclude Cancel Button
Cancel Button: Quits the dialog without making changes.


Include Exclude Help Button
Help Button: This will probably activate the online help :-)


View Context

This window allows you to view and edit (in the registered version) the lines around where the search string was found. To activate the View Context window, highlight a search string find in the Search Results area of the main window and then either double click or select View Context from the right click menu or the View Menu. The Enter key also activates the context viewer (Win95/NT version only).

The context viewer displays text only. However, the Win 95/NT version of Search and Replace will automatically detect binary files and launch our freeware companion utility, HexView, which can display and print any file as a hex dump. HexView can be downloaded from our web site at http://www.funduc.com.

The display font and number of lines displayed in View Context before and after the search string found is configurable under General Options.

You can perform the usual editing operations in this field by using the keyboard as follows:

Copy	Ctrl+C
Paste	Ctrl+V
Cut	Ctrl+X
Undo	Ctrl+Z
Details on the View Context Dialog Fields:

Save button: The changes will be made (registered version only). If the file is in a ZIP file, it is extracted to a subdirectory of the path specified in Options. If you edit a file in a ZIP you must then update the ZIP manually since it is NOT automatically updated. If you need a ZIP utility, take a look at our own Directory Toolkit.

Cancel button: The changes will not be made.

Page Up button: Displays the block of lines above the current block.

Page Down button: Displays the block of lines below the current block.


Saving & Printing the Search Results List

The information in the Search Results area of the main window can be dumped to a text file by specifying a path & file to write the results to in the "Write Output to File" field under Output Options. The display options specified under Output Options will be reflected in the output file, e.g., options such as whether filenames are included and the delimiters to use before &/or after search "hits."

To dump the contents of the Search Results area of the main window to your printer, go to Output Options and enter the phrase "Default Printer" (case insensitive, no quote characters) in the "Write Output to File" field. As with a dump to file (see above), the display settings under Output Options will be reflected in the printed output. Long lines will be wrapped. To turn off printing, return to Output Options, delete the string Default Printer from the "Write Output to File" field, and save the change by pressing the OK button.


No Files Found

Search and Replace was unable to locate any files using the parameters you specified. This does not necessarily mean an error occurred - it could be that there simply are no 'hits' using your search string, file mask, paths, filter, and advanced script settings.

If you are surprised to get no results, go to Output Options and turn on "Display Files Without Hits". This directs Search and Replace to list the files processed according to your file mask, path, and filter criteria. If no files are listed, then your criteria resulted in no files being selected for a search (see below). Conversely, if one or more files are listed as being processed and you are getting a "No Occurrences Found" message, then your search string simply isn't present in any of the files processed. If you expect some hits on your search string, double check your intentions regarding the Case Sensitive and Match Whole Word flags, Regular Expression syntax, and Binary Mode searching.

If no files at all are being processed, double check your File Mask, path, and filter settings. Double check your Search Options settings for Zip searching & the size of regular expression searches.


Options: Overview
Options Dialogs

Options are set from the View Menu or from the Options button on the main screen. They are separated into 5 categories, which you can activate by clicking the tabs at the top of the top of the options dialogs. The options categories are:

General Options: Number of items to save in the drop down lists; View context fonts & # of lines; Display colors; Default file association.

Search Options: Maximum regular expression size; ZIP search temporary directory.

Replace Options: Backup file path definition; Enable/disable routing changed files to the backup path; Replacement prompt choices; Enable preservation of original file time/date stamp during replacements.

Output Options: Hit line display options; Definition of results output file; Printing search results; Characters to delimit search finds.

Filter Options: Exclude files by date &/or size.

Search & Replace Options


Options: General
General Options

Click on the graphic below for help on the options categories or scroll the screen down for a text description of the General options fields.

Details on General Options Fields:

Number of items to save: Select the maximum number of items to save in the Search String, Replace String, Mask, and Path drop down combo list boxes ( [image]) next to the input fields on the main dialog.

Number of lines to view: Select the number of items to view before and after the search results hit line in the View Context dialog.

Found Color Button: Choose this button to display the Color dialog, which you then use to select a new color for the found strings in the list.

File Color Button: Choose this button to display the Color dialog to select a new color for the file names where the strings were found.

If no association use: Enter the default viewer to use when: a) a file has no Windows file association on your computer or b) when you select the Search & Replace default viewer. You may also use the Browse button ( [image]) to select a default viewer via the Select Viewer dialog. Note that the Search & Replace Default Viewer command line will pass the keywords %line% and %path%, for current line and full path to the file highlighted in the results list. This is useful for custom command line settings for viewers/editors that allow you to specify the line number to automatically move to when opening a file. See Default Viewer (under View Menu) for more information.

View Context Font Button: Click this button to display the font dialog to select a new font for the View Context dialog.

OK button: Saves the changes and closes the dialog.

Cancel button: The changes will not be made.


Number of Items to Save
Number of Items to Save:

This setting controls the number of items Search and Replace will save in the drop down lists ( [image]) next to the Search & Replace strings, File Mask, & Path fields. The default is 5. The maximum is 20.


Lines To View
Lines To View: This setting controls the number of lines displayed in View Context window. The default is 5 and the maximum 20.


Found Color
Found Color: Activates a Color Dialog to change the highlighting color of found strings in Search Results and the View Context windows.


File Color
File Color: Activates a Color Dialog to change the highlighting color of file names in the Search Results area.


File Association
If no association use:

Enter the default viewer use when: a) a file has no Windows file association on your computer or b) when you select the Search & Replace default viewer. You may also use the Browse button ( [image]) to select a default viewer via the Select Viewer dialog. The default viewer command line will pass the keywords %line% and %path%, for current line and full path to the file highlighted in the results list. This is useful for custom command line settings for viewers/editors that allow you to specify the line number to automatically move to when opening a file. See Default Viewer (under View Menu) for more information.


View Context Font
View Context Font: Activates a font selector dialog to pick a new font for the View Context dialog.


Options: Search
Search Options

Click on the graphic below for help on the options categories or scroll the screen down for a text description of the Search options fields.

Details on Search Options Fields:

Maximum Regular Expression Size: Enter the maximum number of bytes to allow for regular expression searches. The maximum allowed is 4096 (4K). If you have many search & replaces involving simple expressions, smaller values may speed up operations. Conversely, if you have a regular expression search that involves Binary Characters and/or is very complex, larger values will be necessary.

Unzip files to: Enter a path (or use the browse button - [image]) to temporarily extract ZIP files to for searching when "Search ZIP files" is turned on (see Search and Replace Main Window). The default is the temporary directory defined by your computer's operating system, typically "Windows\Temp". Subdirectories will be created and removed as needed under the specified path.

Stop processing after first hit in file: For search-only operations, when this is checked the search will move on to the next file in the path, mask, & filter criteria after the first hit is found in a file. This is useful for quickly narrowing down files if you have a lot of data to search. For search & replace operations, when this field is checked and Replacement Confirmations are enabled, selecting the "Replace This" prompt will cause the search & replace operation to make that one replacement and then move to the next file. Selecting any other replacement prompt will cause all replacements to be made in that file before processing moves to the next file.

OK button: Saves the changes and closes the dialog.

Cancel button: The changes will not be made.


Maximum Regular Expression Size
Maximum Regular Expression Size:

Enter the maximum number of bytes to allow for regular expression searches. The maximum allowed is 4096 (4K). If you have many search & replaces involving simple expressions, smaller values here may speed up operations. Conversely, if you have a regular expression search that involves Binary Characters and/or is very complex, larger values will be necessary.


UnZip Path
UnZip Path:

Enter a path (or use the browse button - [image]) to temporarily extract ZIP files to for searching when "Search ZIP files" is turned on. The default is the temporary directory defined by your computer's operating system, typically "Windows\Temp". Subdirectories will be created and removed as needed under the specified path.


Stop Processing After First Hit
Stop processing after first hit in file:

For search-only operations, when this is checked the search will move on to the next file in the path, mask, & filter criteria after the first hit is found in a file. This is useful for quickly narrowing down files if you have a lot of data to search. For search & replace operations, when this field is checked and Replacement Confirmations are enabled, selecting the "Replace This" prompt will cause the search & replace operation to make that one replacement and then move to the next file. Selecting any other replacement prompt will cause all replacements to be made in that file before processing moves to the next file.


Options: Replacements
Replace Options

Click on the graphic below for help on the options categories or scroll the screen down for a text description of the Replace options fields.

Details on Replace Options Fields:

Backup File Path: Enter a backup path to use if you want Search and Replace to backup the originals of any files changed during a replace operation. You may use the Browse button ( [image]) to select a path via a Select Path dialog. If Search Subdirectories is turned on, the directory tree of the original path is created as necessary during the Replace operation.

Write Files to Backup Path: Check this box to write the files changed during a replace operation to the Backup Directory specified above. This will leave the original file(s) in the search path unchanged. If Search Subdirectories is checked, the directory tree of the search path is created as necessary under the path specified in Backup Directory. Note that if you check this, you need to remember that the newer, replaced versions of your file(s) will be in the Backup Directory. Search & Replace provides a reminder message when "Write Files to Backup Path" is checked.

Replace Prompts Group:

 Select "Prompt On All" to get a prompt on every string to be replaced in every file.

 Select "Prompt on Each File" to get a prompt for all occurrences in each file. Note that if you use this option, you may not realize exactly the context of every string you replace.

 Select "No Prompts" to not get any prompts whatsoever for all replaces. Note that If you use this option, you may not realize the exact context of every string you replace or which files you replace them in until after the operation is finished.

 Note: If you are using an Advanced Script operation, read over the help section on Replacement Prompts for details about the behavior of replacement prompts and Advanced Scripts.

Do Not Change File Date/Time: When enabled, Search & Replace preserves the original time & date stamp of files when replacements are made.

OK button: Saves the changes and closes the dialog.

Cancel button: The changes will not be made.


Backup Path
Backup Path:

Enter a backup path to use if you want Search and Replace to backup the originals of any files changed during a replace operation. You may use the Browse button ( [image]) to select a path via a Select Path dialog. If Search Subdirectories is turned on, the directory tree of the original path is created as necessary during the Replace operation.


Write Output to Backup Path
Write Output to Backup Path:

Check this box to write the files changed during a replace operation to the directory specified in the Backup File Path field. This will leave the original file(s) in the search path unchanged. If Search Subdirectories was checked, the directory tree of the search path will be created as necessary under the path specified in Backup Directory. Note that if you check this, you need to remember that the newer, replaced versions of your file(s) will be in the Backup Directory. Search & Replace provides a reminder message when "Write Files to Backup Path" is checked.


Replacement Prompts?
Replacement Prompts?:

This mutually exclusive selector controls whether or not Search and Replace will supply prompts during replacement operations.

 Select "Prompt On All" to get a prompt on every string to be replaced in every file.

 Select "Prompt on Each File" to get a prompt for all occurrences in each file. Note that if you use this option, you may not realize exactly the context of every string you replace.

 Select "No Prompts" to not get any prompts whatsoever for all replaces. Note that If you use this option, you may not realize the exact context of every string you replace or which files you replace them in until after the operation is finished.

 Note: If you are using an Advanced Script operation, read over the help section on Replacement Prompts for details about the behavior of replacement prompts and Advanced Scripts.


Do not chage file date/Time
Do Not Change File Date/Time:

When enabled, Search & Replace preserves the original time & date stamp of files when replacements are made.


Options: Output
Output Options

Click on the graphic below for help on the options categories or scroll the screen down for a text description of the Output options fields.

Details on Output Options Fields:

Hit Line Display: When checked -

 Display Files Without Hits will cause the display to list the filenames where no occurrences of the search string were found. Note that if this is the only box checked, the display will not list files were the search string is present.

 Display First Hit Line will cause the display to list the filenames and the highlighted context of where the search string was found. If you are searching across multiple lines, the first line of the hit will be displayed. Note that if this is the only box checked, you will only get feedback from files where the search string was found.

 Display Replace String will cause the display to list the filenames, replacements, and total counts for all replacements. Note that if this is the only box checked, you will not see the context of each replacement. Check "Display First Hit Line" if you want to see the full replace contexts.

 Display Number of Hits in File lists the filename(s) and number of times the search string was found in that file. Note that if "Display First Hit Line" is not checked, only the number of hits will be listed. Select this if you only want to know how many hits were found in each file.

Show Output to File: To route the contents of the Search Results list to a file, enter a file of your choice in this field. If this field is blank, no file is produced. If no path is specified, the current directory is used. Use the Browse button ( [image]) to the right of the field to select an output file via a File Save As dialog. The default suggestion for the File Save As dialog is the file "Results.txt." However, you are free to use any filename. Note that what is written to this file is the same information presented in the Search & Replace results display. Therefore, to adjust the output, make selections in the "Hit Line Display" checkbox fields.

Note: To route the contents of Search Results list to your printer, enter the phrase "Default Printer" (case insensitive, no quote characters) in the "Write Output to File" field. Long lines will be word wrapped in the printed output. To turn off printing, return to Output Options, delete the phrase Default Printer from the "Write Output to File" field, and save the change by pressing the OK button.

Before Hit: You can change the string displayed "before" hits in clipboard dump or in the Output File. Blank out this field if you want nothing to be displayed.

After Hit: You can change the string displayed "after" hits in clipboard dump or in the Output File. Blank out this field if you want nothing to be displayed.

OK button: Saves the changes and closes the dialog.

Cancel button: The changes will not be made.


Display Files Without Hits
Display Files Without Hits:

When checked, the display will list the filenames where no occurrences of the search string were found. Note that if this is the only box checked, the display will not list files were the search string is present.


Display First Hit Line
Display First Hit Line:

When checked, the display will list the filenames and the highlighted context of where the search string was found. If you are searching across multiple lines, the first line of the "hit" will be displayed. Note that if this is the only box checked, you will only get feedback from files where the search string was found.


Display Replacement String
Display Replacement String:

When checked, the display will list the filenames, replacements, and total counts for all replacements. Note that if this is the only box checked, you will not see the context of each replacement. Check "Display First Hit Line" if you want to see the full replace contexts.


Display Number of Hits
Display Number of Hits:

When checked, the display will list the filename(s) and number of times the search string was found in that file. Note that if "Display First Hit Line" is not checked, the only thing listed will be the number of hits. Select this if you only want to know how many hits were found in each file.


Write Replacement Output To File
Write Output To File:

To route the contents of the Search Results list to a file, enter a file of your choice in this field. If this field is blank, no file is produced. If no path is specified, the current directory is used. Use the Browse button ( [image]) to the right of the field to select an output file via a File Save As dialog. The default suggestion for the File Save As dialog is the file "Results.txt." However, you are free to use any filename. Note that what is written to this file is the same information presented in the Search & Replace results display. Therefore, to adjust the output, make selections in the "Hit Line Display" checkbox fields.

Note: To route the contents of Search Results list to your printer, enter the phrase "Default Printer" (case insensitive, no quote characters) in the "Write Output to File" field. Long lines will be word wrapped in the printed output. To turn off printing, return to Output Options, delete the phrase Default Printer from the "Write Output to File" field, and save the change by pressing the OK button.


Before Hit Character
Before Hit Character(s):

Enter the character string to be displayed "before" hits in clipboard dump or in the Output File. If you do not want anything displayed, blank out this field.


After Hit Character(s)
After Hit Character(s):

Enter the character string to be "displayed" after hits in clipboard dump or in the Output File. If you do not want anything displayed, blank out this field.


Options: Filters
Filter Options

Click on the graphic below for help on the options categories or scroll the screen down for a text description of the Filter options fields.

Details on Filter Options Fields:

Exclude File(s) by Date: The "Before Date" will exclude all files whose date stamp precedes the date entered and the "After Date" will exclude all files whose date stamp falls after the date entered. You may enter values in one or both date fields. By combining settings, you can limit operations to files whose time stamp falls in a specific range. For example, to process only files that were last modified in April 1997, enter a "Before Date" of 03/30/97 and an "After Date" of 05/01/97. Date exclusions can also be combined with one or both of the exclude by size filters.

Exclude File(s) by Size: The "Less Than" field will exclude all files whose size is smaller than the value entered and the "Greater Than" excludes files whose size is larger than the value specified. Size units may take the form of # of bytes or whole K, KB, or M values, e.g., 100K, 100KB, 1M, 4M. You should not enter fractional values when using K, KB, M quantities. You may enter values in one or both size fields and size exclusions may be combined with one or both date exclusion values. For example, to limit the display to files smaller than 8000 bytes modified sometime in April 1997, enter a "Before Date" of 03/30/97, an "After Date" of 06/01/97, and a "Greater Than" value of 8000.


Filter Options Explanation (P)
Filter Options:

Filter Options are used to set file date and file size criteria for files to include or exclude from your search &/or replacements. Filters are used in conjunction with search paths, file mask, and advanced script settings to specify which files will be processed.


Exclude Before Date
Exclude Before Date:

If a date is entered here, all files whose date stamp precedes that date will be excluded from your search. In the example here, files earlier than 3/31/97 will be excluded from the search (& replace). You may combine this setting with an "After Date" to limit operations to a specific date range. Date exclusions can also be combined with one or both of the exclude by size filters.


Exclude After Date
Exclude After Date:

If a date is entered here, all files whose date stamp comes after that date will be excluded from your search. In the present example, all files later than 5/1/97 will not be included in the search (& replace). You may combine this setting with a "Before Date" to limit operations to a specific date range. Date exclusions can also be combined with one or both of the exclude by size filters.


Exclude Files Less Than
Exclude Less Than:

This field excludes all files whose size is smaller than the value entered. Size units may take the form of # of bytes or whole K, KB, or M values, e.g., 100K, 100KB, 1M, 4M. You should not enter fractional values when using K, KB, M quantities. This field can be combined with a value in the "Larger Than" field and one or both of the date filters.


Exclude Larger Than
Exclude Larger Than:

This field excludes all files whose size is smaller than the value entered. Size units may take the form of # of bytes or whole K, KB, or M values, e.g., 100K, 100KB, 1M, 4M. You should not enter fractional values when using K, KB, M quantities. This field can be combined with a value in the "Less Than" field and one or both of the date filters.


Options OK Button
OK Button: Saves the current settings and closes the dialog.


Options Cancel Button
Cancel Button: Closes the dialog and cancels any changes made.


Options Help Button
Help Button: Activates online help.


Select Path Dialog Box

The Select Path Dialog provides a convenient way to select and insert a directory into the various "Path" lines. The dialog is a standard Windows path browser. For the Win 95/NT version, expand or contract directory by clicking on the [image] or [image]. Alternatively, you can use the arrow keys. For the Win3x version, click on the [image] or the [image] folder graphics. Click OK when done.

Win 95/NT Version	Win3x Version


File Open / Select Viewer Dialog Box
File Open/Select Viewer Dialog

File Name: Select or type the name of the document you want to open. This box lists documents with the filename extension selected in the List Files Of Type box. To see a list of files with a particular extension, type an asterisk (*), a period, a three-character extension, and then press ENTER. To see files with more than one filename extension, type a semicolon (;), a second asterisk (*), a period, and another three-character extension. For example, if you want to see all files with the .TXT extension and all files with the .INI extension, type *.txt;*.ini.

List files of Type: Select the type of files you want to see in the File Name list.

Directories: Select the directory where the files you want reside.

Drive: Select the drive where the files you want reside.

OK button: The file you selected will be used.

Cancel button: The file will not be used.


File Save Dialog

File Name: To save a document with a new name, in a different file format, or in a different location, type a new filename. To save a document with an existing filename, select the name in the list or type the current name.

Save files of Type: Select the type of files you want to see in the File Name list.

Directories: Select the directory where the files you want to search reside.

Drive: Select the drive where the files you want to search reside.

OK button: The file you selected will be used.

Cancel button: The file will not be used.


Color dialog

Display colors are set in General Options.

Basic Colors: Basic colors are a palette of the preset colors available for your display. Click the color you want to use or use the TAB key to move to the color you want and press the SPACE bar to select it.

Custom Colors: Custom colors may be set by using the Define Custom Colors Button. They are selected the same way Basic Colors are.

Define Custom Colors Button: Allow you to create your own colors.

OK button: The changes will be made.

Cancel button: The color will not be changed.


Font dialog

Display fonts are set in General Options.

Font Field: The face name of the font used.

Font Style Field: The available styles vary depending on the Font selected. The most common are Regular, Italic and Bold.

Font Size Field: Point size of the font. You can enter a custom value if you don't see it in the list for some fonts.

Strikeout box: Check it to select a strikeout font.

Underline box: Check it to select an underlined font.

Color list: Select the font color.

Script: Select the appropriate language script for that font.

OK button: The changes will be made.

Cancel button: The font will not be changed.


Regular Expressions: Overview

Regular Expressions are used for advanced searches, where the search string follows a rule and is not always exactly the same. Regular Expressions employ "special character operators," which are symbols that control the search, and "an expression," which is a combination of characters and operators that specifies a pattern. Regular Expressions can be used in replacements, they can make use of Binary Characters & Special Replacement Operators, and they can be case sensitive or not. You can also change the number of bytes to allow for regular expressions under Search Options.

Search and Replace uses a Regular Expression syntax that is a subset of UNIX grep notation for Searching and DOS style Batch file %n input parameter notation, with extensions, for Replacing. The major differences between the Search and Replace and grep regular expressions are:

. operator is not supported

* + ? ! operators must precede an expression enclosed by () or []. Otherwise, the operator is assumed to match any/all characters from beginning of line or to the end of the line. For example, if used in Search and Replace, the grep expression [123]* would match the numbers plus everything to the end of the line. The Search and Replace counterpart is *[123], which would match just the numbers.

Regular Expression Help Topics

Regular Expression Search Operators - details on conducting searches using regular expressions.

Regular Expression Replacement Operators - details on regular expressions replacement operations.

Regular Expression Examples - some examples regular expression search-only and search-replace operations.


Regular Expressions Search Operators
Regular Expression Search Operators

Search Operators Index

Match Operators	Sub-Expression Operators
* - Zero or More    + - One or More    ? - Exactly One    | - Or Operator    ! - Not Operator    ^ - Start of Line    $ - End of Line	[] - Range Operator    () - Sub-Expression    +n - Column Operator

Additional Issues

   Notes on Search Expressions
   Literal Characters & Search Expressions

Related Topics

   Regular Expressions Overview
   Regular Expression Replacement Operators
   Regular Expression Examples
   Regular Expression Counter Operators
   Special Replacement Operators

Some Notes on Search Expressions:

 The following characters must be preceded by a \ character to be interpreted as a literal in a search using regular expressions:

- + * ? ( ) [ ] \ | $ ^ !

For example, to search for the \ character, you must use a double it (\\) in order for \ to be matched correctly when using Regular Expressions. The characters that must be preceded by a \ in order to be interpreted as literal characters are also described below. You should also note that the regular expression replacement literals involve a different set of characters.

 You may wish to increase the "Maximum Regular Expression Size" under Search Options if you have a regular expression search that involves Binary Characters and/or is very complex.

Regular Expression Search - Match Operators

*	Zero or More Operator: Matches zero or more expressions enclosed in () or [].  * may be used by itself, although it is intended to be used around strings. If the * operator is entered alone it will match all characters from the start of the line to the end of the line. You can match characters between two or more strings up to the maximum regular expression size by specifying a range after the * operator. Entering several expressions in a row containing * should be done carefully to avoid overlapping matches which may produce unpredictable results.
	*(is) *[is] Windows *[0-9] Windows*[]95 Windows*[\0-ÿ]	matches matches matches matches matches	is, Mississippi Some, Expression, single Windows 95, Windows 98 up to 4096 characters (across several lines)     between Windows and 95 same as the above (older syntax)
	Note: When * is combined with a numeric range and the %n>> or %n>starting value> replacement operators, the search expression above, Windows *[0-9], would be part of a Regular Expression Counter Operation.
+	One Or More Operator: Matches one or more of the occurrences of the expression. + is intended to be combined with () and care should be taken when using + by itself. For example,
	+(is) w+e	matches matches	is, Mississippi wide, white, write but not we
?	One Occurrence Operator: Matches exactly any character either before or after a string. ? also matches any character between two strings. When combined with (), ? matches exactly one expression enclosed in (). Using the ? operator by itself will match every character in a file one at a time and therefore probably should be avoided.
	?(is) Win?95	matches matches	is or si Win 95, Win-95, Win/95
|	Or Operator: Matches the simple expression either before or after the | (pipe) symbol. This should be used in conjunction with (). Or expressions should not contain other operators such as *+^$?. You may, however, make use of other operators outside the (). For example,
	(01/|02/)+[0-9](/95|/98) w*[a-z ](98|NT)\?	matches matches	01/15/98 & 02/12/98 but not 03/12/98 Windows 98?, Win NT?
!	Not Operator: No match will be made if the expression is found. The NOT operator can be combined with other wildcard & subexpression operators. When combined with [], nothing in the range described in the brackets will be matched. For example,
	!(b|c)at !(Windows )98 ![a-z ]98	matches matches matches	at in mat, rat or fat but not in bat or cat 98 in 1998 but not in Windows 98 98 in 1998 but not in Windows 98
^	Beginning Of Line Operator: Matches an expression that starts at the beginning of a line. This may be combined with other wildcard and subexpression operators. However, you should avoid using ^ inside () expressions. Use *(\r)\n instead. Some examples of ^ are:
	^the ^(the|[a<])	matches matches	the, The, THE, tHE at the beginning of a line    and if case sensitive is off. the in The opening paragraph... A in At 5 pm ... < in <HR>
$	End Of Line Operator: Matches an expression that is found at the end of a line. This may be combined with other wildcard and subexpression operators. However, you should avoid using $ inside () expressions. Use *(\r)\n instead. Some examples of $ are:
	end$ (the end|of a line.)$	matches matches	end only if it is at the end of a line the end in This is the end of a line. in the end of a line.

Regular Expression Search - Sub-Expression Operators

[ ]	Range Operator: This may be a list of single characters such as [dog], one or more ranges of characters such as [d-o0-2], or a more complex expression using other match or sub-expression operators such as do[g|uble]. Ranges are allowed by using the "a-z" notation. When entered alone, [] will match all characters and is equivalent to ?[]. Care should be used with [] alone as it will match all characters in the file. When combined with the * operator, as in *[], the match will span across one or more lines up to the number of characters specified in Program Options under the Maximum Regular Expression Size. Use the ?*+ operators to modify the range to be matched by the [] sub-expression operator. You can also enter [a-zA-Z0-9\-_], e.g., multiple ranges and the - character itself preceded by a \. For example,
	t[]e H*[]d *[0-9] +[niewW] [a-z]	matches matches matches matches matches	The, Toe Hello (cr -lf) World across two lines 234907, 5795, or an empty string one or more strings such as Win, new, win any lower case string if case sensitive is on     and any words if not case sensitive
	Note: When [] is combined with a numeric range, the * operator, and the %n>> or %n>starting value> replacement operators, a search expression such as Windows *[0-9] would be part of a Regular Expression Counter Operation.
( )	Subexpression Operator: Parentheses are used to denote one or more sub-expressions. This is usually combined with the OR operator - |. For example,
	Win( 95|dows 95)	matches	Windows 95 and Win 95
+n	Column Specifier: This is used to denotes the number of columns to match either before or after an expression. The Column Specifier may be used with a simple search term such as the expression +4The or in combination with other the [] or () sub-expression operators. A range of columns to match may also be specified, such as The+4-10. For example,
	+4[]w w+2 [ ]+5-15[0-9.]	matches matches matches	llo W in Hello World Wor in Hello World 100.01, 123.9, & 543.21 in    Data1       100.01  Somethin'    Dat2       123.9   Nuthin'    Dataa3      543.21  and junk

Regular Expression Search - Special Literal Characters

- + * ? ( ) [ ] \ | $ ^ !	If you wish to search for any of these characters, they must be preceded by the \ character to be interpreted as a literal in a search.


Regular Expression Also See Popup 1
Regular Expression Replacement Operators

Regular Expression Examples

Regular Expression Counter Operators

Special Replacement Operators


Regular Expressions Replacement Operators
Regular Expression Replacement Operators

Replacement Operators Index

Match Operators

   %n - Basic Replacement Operator
   < - Lower Case Operator
   > - Upper Case Operator
   %n>> / %n<< - Counter
   %n>#> / %n<#< -Counter

Additional Issues

   Notes on Replacement Expressions
   Literal Characters & Replacement Expressions

Related Topics

   Regular Expressions Overview
   Regular Expression Search Operators
   Regular Expression Examples
   Regular Expression Counter Operators
   Special Replacement Operators

Some Notes on Replacement Expressions:

 The operators' matches can be replaced with nothing (removed). The case of the text matched can be changed. Matches can also be left intact. All operators may match some strings and therefore all should be accounted for in the replace expression.

 The following special replacement characters must be preceded by a \ to be interpreted as a literal in a replace:

% \ < >

For example, to replace the \ character in a regular expression search & replacement, you must double it (\\). The characters that must be preceded by a \ in order to be interpreted as literal characters are also described below. You should also note that the regular expression search literals involve a different set of characters.

 Up to 24 parameters may be used at once by referring to those over number nine by moving up the ASCII table, e.g., 123456789:;<=>?@ABCDEFGH. However, if your procedure involves a large number of parameters, consider whether it might not be handled more simply using a multi-step script search-replace.

 To view the result of all replace operations, turn on the "Prompt on All" radio button under Replace Options.

 You may wish to increase the "Maximum Regular Expression Size" under Search Options if you have a regular expression search that involves Binary Characters and/or is very complex.

Regular Expression Replacement Operators

%n	Basic Replacement Operator: Core replacement operators use a %n convention, where n corresponds to a component in the regular expression search string. For example, %1 refers to the first expression value in the search string, %2 refers to the second, and so on. The %n parameters may be used several times, omitted, or used in any order. Up to 24 parameters may be used at once by referring to those over number %9 moving up the ASCII table, e.g., 123456789:;<=>?@ABCDEFGH. However, if your search-replace involves a large number of parameters you may find it easier to use a multi-step script search-replace. Some examples of %n usage are:
	Given the series: Search Expression: Replacement Expression: Results: Values:	<a href="http://wait.com">S1</a> <a href="http://waitalot.com">S2</a> <a href="http://wait*[]">*[]< <a href="http://wait%1">(Slow) %2 < <a href="http://wait.com">(Slow) S1 </a> <a href="http://waitmore.com">(Slow) S2 </a> %1 = *[] %2 = *[]
	Given the series: Search Expression: Replacement Expression: Results: Values:	<BR>     <BR> (TAB)<BR> ^<BR> <BR> <BR> <BR> <BR> Here, the absence of %1 in the replace expression   is used to eliminate spaces & tabs before <BR>.
	Given the series: Search Expression: Replacement Expression: Results: Values:	#include [stdafx.h] #include [my_include.hpp] #include [sr32.h] ?include (<|\[)+[a-z0-9_].h*(p)+[\]>] %1exclude [%3>.H%4>] #exclude [STDAFX.H] #exclude [MY_INCLUDE.HPP] #exclude [SR32.H] %1  - ? %2  - (<|\[) %3 -  +[a-z0-9_] %4 -  *(p) %5 - +[\]>]
<	Lower Case Operator: This is to be used in conjunction with %n, where %n< replaces the original matched expression with the lower case version. For example,
	Given: Search Expression: Replacement Expression: Results:	MAKE THIS ALL LOWER CASE +[A-Z] %1< make this all lower case
>	Upper Case Operator: This is to be used in conjunction with %n: For example, %1> replaces the original first matched expression with the upper case version. For example,
	Given the series: Search Expression: Replacement Expression: Results:	All words beginning with letter w. w+[a-z] W%1> All WORDS beginning WITH letter w.
%n>> %n<<	Plain Counter Operator: This is a special case of the %n>#> and %n<#< operators below, where no starting value is defined by the user. When used in conjunction with a numeric regular expression search such as *[0-9], %n>> and %n<< begin incrementing up or down with a value of +/-1 from the value of the first number found by *[0-9]. For example,
	Given the series: Search Expression: Replacement Expression: Results:	page5.htm, page2.htm, page4.htm page*[0-9] page%n>> page6.htm, page7.htm, page8.htm
	See Counter Operators for more information & examples.
%n>#> %n<#<	Start Value Counter Operator: An extension of the above, this operator allows you to specify a starting value for an incrementing replacement counter. %n>starting value> and %n<starting value< begin counting up or down with a value of +/-1 from the starting value you supply. This counter operator respects the number of digit places you supply. To begin incrementing upward with a value of 1, use the expression %n>0>. The expression %n>000> would begin replacements with a value of 001. Another example is:
	Given the series: Search Expression: Replacement Expression: Results:	Var19, Var82, Var8 Var*[0-9] Var%n<100< Var99, Var98, Var97
	See Counter Operators for more information & examples.

Regular Expression Replacements - Special Characters (Literals)

% \ < >	If you wish to replace any of these characters, they must be preceded by the \ character to be interpreted as a literal in a replacement.


Regular Expressions Replacement Literals
Regular Expression Replacement Literals:

% \ < > must be preceded by the \ character to be interpreted as literals in a regular expression replacement.


Regular Expression Search Literals
Regular Expression Search Literals:

- + * ? ( ) [ ] \ | $ ^ !  must be preceded by the \ character to be interpreted as literals in a regular expression search.


Regular Expressions Also See 2
Regular Expression Search Operators

Regular Expression Examples

Regular Expression Counter Operators

Special Replacement Operators

Special Replacement Operators


Regular Expressions Examples: Overview
Regular Expression Examples Overview

Note: For all the replace operations, you can see the result of the operation by turning on the "Prompt on All" radio button under Replace Options.

Three sets of examples are available:

Some Basic Regular Expression Search Examples

Additional Regular Expression Search Examples

Search and Replace Regular Expression Examples

Also see

Regular Expressions Overview

Regular Expression Search Operators

Regular Expression Replacement Operators

Regular Expression Counter Operators

Special Replacement Operators


Regular Expressions Also See Popup 3
Regular Expression Search Operators

Regular Expression Replacement Operators

Regular Expression Counter Operators

Special Replacement Operators


Regular Expressions Examples: General Search
Some Basic Regular Expression Search Examples

 Also see

Some Basic Regular Expression Search Examples

What to Match	Operator	Examples
Any single character	?	g?t finds get, got, gut, together
Any string of characters (one or more)	+	w+e finds wide, white, write but not we
Any string of characters (or none)	*	w*e matches wide, white, write and we
One of the specified characters	[]	g[eo]t matches get and got but not gut
One of the characters in a range	[-]	[b-p]at matches bat, cat, fat, hat, mat but not rat or sat
All characters	[]	l[] matches line, list, late
One expression or another	(|)	W(in|indows) matches Win or Windows
One or more expressions	+()	+(at) matches atat in catatonic and at in battle
All characters (perhaps on different lines)	*[]	h[]d matches helped, Hello World, & Hello (cr lf) Win95 World. Use [] instead of complicated range expression such as [a-zA-Z0-9]. This will span across lines up to the limit set by Maximum Regular Expression Size (Search Options).
Two strings "nearby" (perhaps on different lines)	*[]	the*[\0-ÿ]first matches the first and the (cr lf) very first Note: This is an older style syntax using Binary characters.
A string that doesn't start with an expression	!()	!(http): matches : in following: but not in http://www.funduc.com
One of the characters not in a range	![-]	![b-p]at matches at in rat & sat and nothing in bat, cat, fat, hat.
Find all words of length x		![a-z]+x[a-z]![a-z] will find all x letter words, e.g., ![a-z]+3[a-z]![a-z] finds all 3 letter words.
An expression at the beginning of a line	^	^the finds the at the beginning of a line and The if case sensitive is turned off.
An expression at the end of a line	$	end$ finds end when it's the last string on a line.
One or more column(s) before or after a string	+n	[h]+4// finds http:// but not https://


Regular Expressions Also See Popup 4
Additional Regular Expression Search Examples

Search and Replace Regular Expression Examples

Regular Expression Search Operators

Regular Expression Replacement Operators

Regular Expression Incrementing Counters

Special Replacement Operators

Additional Regular Expressions Search Examples


Additional Regular Expressions Search Examples
Additional Regular Expression Search Examples

 Also see

Additional Regular Expression Search Examples

Search String	Match
L[]	line, list, lane, LogVar1 (when case sensitive is off)
[on]	non, no, on
\[	[
+[a-z]	abcdefghijklomopqrstuvwxyz Note: If used with Case Sensitive off, it will also match ABCDEFGHIJKLMNOPQRSTUVWXYZ
[a-zA-ZÀ-ÿ]	matches the same as the +[a-z] example above (regardless of case sensitive flag) and also all other special characters for Western European languages. See the Binary Mode dialog for the order of those characters in the ASCII table.
+(one|two|three)	one, onetwo, twothree
?(one|two|three)	one, two, three
Windows*[\0-ÿ]95	Will match up to 4096 characters (on several lines) between Windows and 95.
All * replaces	all the replaces (the * character matches all chars on the same line unless a [] expression overrides that - see above)
/**[\0-ÿ]*/	Matches C style comments on several lines if necessary (up to 4069 characters)
01*[0-9].htm	01346.htm, 01.htm, 016965.htm
*[ab]c	c, abc, bac, abbc, bbac
?include (<|\[)+[a-z0-9_].h*(p)+[\]>]	Matches:    #include [stdafx.h]    #include <dos.h>    #include [my_include.hpp]    #include [sr32.h]


Regular Expressions Also See Popup 5
Some Basic Regular Expression Search Examples

Search and Replace Regular Expression Examples

Regular Expression Search Operators

Regular Expression Replacement Operators

Regular Expression Incrementing Counters

Special Replacement Operators


Regular Expressions Examples: Search and Replace Examples
Search and Replace Regular Expression Examples

 Also see

Regular Expression Search & Replacement Examples

Search String	Replace String	Effect
*.*	%1>.%2>	c:\windows\win.ini  => C:\WINDOWS\WIN.INI
+[a-z]	%1>	Windows  => WINDOWS
7*.htm	5%1.htm	711.htm => 511.htm 7days.htm => 5days.htm
[253]7[832].htm	%15%2.htm	3572.htm => 3552.htm
*[253]7[832].htm	%15%2.htm	72.htm => 52.htm
(homepage|index).htm	%11.htm	homepage.htm => homepage1.htm index.htm => index1.htm
+(12)*[0-9]	%1%2a	12532 => 12532a 1212753 => 1212753a
*(d|m).htm	%1%2%3d1.htm	card.htm => card1.htm form.htm => ford1.htm
!(\r)\n	\r\n	Converts UNIX to DOS end-of-line termination.
?(Windows)	OS/2	Windows => OS/2    (just kidding)
back2.jpg*[]height="30"	back2.jpg%1height="32"
		src="images/back2.jpg" alt="Go Back"    border="0" width="57"    height="30" becomes:    src="images/back2.jpg" alt="Go Back"    border="0" width="57"    height="32" Note: This search - replace changes the height setting for 'back2.jpg' regardless of differing 'alt' text or how the html editor line breaks the code across lines.


Regular Expressions Also See Popup 6
Basic Regular Expression Search Examples
Additional Expression Search Examples
Regular Expression Search Operators
Regular Expression Replacement Operators
Regular Expression Incrementing Counters
Special Replacement Operators


Regular Expression Counters
Regular Expression Search & Replace Incrementing Counters

 Also see

Regular Expression Counter operations allow you to quickly revise a sequence of numbers in one or more files. You can also insert sequential numbers in strings where no numbers exist originally. Counter operations make use of *[0-9] regular expression search operator and either the %n>user defined starting value> or %n<user defined starting value< regular expression replacement operators. Counter increment +/-1 from the starting value you supply. If no value is supplied, as in the case of %n>> or %n<<, then incrementing begins with a value of +/- 1 from the value found by your *[0-9] expression. For example, if the value found by the *[0-9] search expression is 10, %n>> will begin at 11.

The %n>user defined starting value> and %n<user defined starting value< replacement operators respect the number of digit places you supply. For example, the expression %1>1> would begin incrementing with 2. The expression %1>000> begins incrementing with 001.

You may also supply a negative number for user defined starting value. For example, %1>-5> would insert the values -4, -3, -2, -1, 0, and so on.

Incrementing counter operations may be combined with other regular expression search & replace operators. For example, a search expression such as (file|variable)*[0-9] with a counter replacement expression such as %1%2>100> is perfectly legal.

Finally, %n>> and %n>> counter replacements will be cummulative across the files found by your search criteria. As shown in the last example below, they do not reset with each file under these conditions. To set a starting value in this case, do a search and change to value found in the first hit to one less (or greater for %n<<) than your desired starting value.

Regular Expression Counter Examples

Initial Contents: Search String: Replace String: Results:	Windows 98 will be released in 5 days. *[0-9] %1>> Windows 99 will be released 100 days.
Initial Contents: Search String: Replace String: Results:	file.htm, file.htm, ffillee.htm e*[0-9].htm e%1>>.htm file2.htm, file3.htm, ffillee4.htm
Initial Contents: Search String: Replace String: Results:	Var22  Var20  Var86  Var30 Var*[0-9] Var%1<50< Var49  Var48  Var47  Var46
Initial Contents: Search String: Replace String: Results:	Var22  Var20  Var86  Var30 Var*[0-9] Var%1>00> Var01  Var02  Var03  Var04
Initial Contents: Search String: Replace String: Results:File 2 Results:	VarA101 VarB12 VarC0 VarA102 VarB45  Var[a-z]*[0-9] Var%1%2>08> VarA09 VarB10 VarC11 VarA12 VarB13
File 1 Initial Contents: File 2 Initial Contents: Search String: Replace String: File 1 Results: File 2 Results:	cat & dog  cat & dog  cat & dog  cat & dog  cat*[0-9] \& dog*[0-9] cat%1>> & dog%2>> cat2 & dog2  cat3 & dog3  cat4 & dog4 cat5 & dog5


Regular Expressions Also See Popup 7
Regular Expression Search Operators
Regular Expression Replacement Operators
Regular Expression Examples
Special Replacement Operators


Special Replacement Operators
Special Replacement Operators (%%srpath%% & %%srfile%%)

Search and Replace currently has two special replacement operators - %%srpath%% and %%srfile%%. %%srpath%% inserts the path to the file in which the search string was found and %%srfile%% inserts the filename of that file. %%srpath%% and %%srfile%% may be used in ordinary search & replace operations, Regular Expressions, Regular Expression Counters, Scripts, and Binary Mode operations.

You do not need to activate Regular Expression mode to use %%srfile%% and %%srpath%%.

%%srpath%% & %%srfile%% Examples

Ordinary Search/Replace
File Searched: Initial String in File: Replace String: Search String: Results:	D:\Example\Test.txt Page No. Page No. %%srpath%%%%srfile%% Page No. D:\Example\Test.txt Page No.
Complex Search/Replace
Files Searched: File Mask: Initial String in Files: Regular Expression Search String: Binary Mode Replace String: Results:	home.htm; index.html *.htm* Last Updated: 10/10/97 and Last Updated 10/12/97 Last Updated: *[0-9]/*[0-9]/*[0-9] Last Updated %1/%2/%3\r\nUrl: %%srfile%% Last Updated: 10/10/97 Url: home.htm     and Last Updated: 10/12/97 Url: index.html
Note for Advanced Users:

%%srpath%% and %%srfile%% can be used in Command Line  operations. However, some extra steps will be necessary to deal with the "%%" characters.

For example, on a Win95 machine, the following SET commands:
SET T=%%%
SET P=srpath
SET F=srfile

and the command line:

SR32 /I /Pexample.txt /S"Page No." /R"%t%%p%%t%%t%%f%%t%, Page No."

replaces all instances of the string Page No. in the file example.txt (which is in the path d:\example) to d:\example\example.txt, Page No.

Consult your operating system manual for further information on how to pass the literal %% characters to the command line.


Binary Mode (Special Characters or Multiple Lines) Dialog
Binary Mode Dialog

The binary mode dialog is activated by the [image] buttons next to the Search and Replace string fields in the main window and Script Editor. This dialog is used to enter multiple lines for search and replace strings and binary characters such as tabs, special characters, etc. See Using Special Characters for more details. To Search/Replace line feeds, use \r\n. To Search/Replace TAB characters, use \t. If you need to use the \ character (e.g., in a path), you must double it (\\). Special Replacement Operators may be combined with binary replacement operations.

Note that you may wish to increase the "Maximum Regular Expression Size" under Search Options if you have a regular expression search involving binary characters that is complex or spans many characters. In particular, for multi-line searches, you may wish to increase the value.

Please Note: While Search and Replace allows replacing in binary files (such as .DOC, .XLS etc.), these proprietary format files may contain internal counters which may get out of synch. As a result, the application that created the file may not be able to read it. For best results, replace in ASCII text files only (such as .HTM, .RTF, .TXT, .INI, .C, .CPP, .H etc.). In particular, Word files should be converted to RTF format which can be safely processed.

Note: If you have a search/replace where you want to span one or more lines but are not concerned with CR LF's or Tab's per se, consider using the *[] regular expression search operator.

Click on the graphic below for help on the Binary Mode fields or scroll the screen down for a text description of the fields.

Details on the Binary Mode Fields:

Search/Replace Block field:  You can type, paste (using paste button or Ctrl+V) text already in the Clipboard or use the Binary Codes list (below) to add characters to this field. You can perform the usual editing operations in this field by using the keyboard as follows:

Copy	Ctrl+C
Paste	Ctrl+V
Cut	Ctrl+X
Undo	Ctrl+Z
Special Operations group (Search field only): You can instruct Search and Replace to prepend (add to the beginning of the file) or append (add at the end of the file) a block of text to each file processed or to simply use the Search String entered. The string in the Replace field will be prepended or appended. You can confirm replacing the same way you can with regular search strings. The Search Block field will change accordingly if you select "Add to top of file" or "Add at bottom of file". This radio button area is not available when editing a binary replacement string.

Binary Codes fields: This list allows you to add special characters to the Search/Replace field by either double-clicking or selecting an item and then clicking the Add Code button

Add Code button: The Binary Code specified will be added to the Search/Replace Block field.

OK button: The Search/Replace field will be used as specified.

Cancel button: No changes are made.

Paste Text: The text currently in the clipboard is pasted in the Search/Replace Block field. If anything is selected in the Search/Replace field, the selection will be replaced by the text pasted. If no text is in the clipboard, nothing will happen.

Double all \s button: The \ character is used to input special (binary) characters. To use a literal \ character (for example in a path), you must enter it as \\. This button will facilitate that by parsing the current text entered in the Search/Replace block field and changing all \s to \\.


Binary Mode Search/Replace Block
Binary Mode Search/Replace Block:

Shown here is the dialog for a search field that makes use of a regular expression (*[0-9]) and looks for carriage return\line feed (\r\n). You can type in, paste text from the clipboard, or use the Binary Codes list to add characters to this field. The ctrl key editing shortcuts ^C (copy), ^V (paste), ^X (cut), & ^Z (undo) work here. The Paste Button will also paste in the clipboard contents.


Binary Mode Codes
Binary Mode Codes:

This is a complete list of supported codes. Highlight a code you want to use and click on the "Add Code" button to insert it in the Search/Replace block field.


Binary Mode Add Code Button
Add Code Button:

Click here to insert the codes you highlighted in the Binary Codes list into the Search (or Replace) block at the top of the dialog.


Binary Mode OK Button
OK: Click here when you are finished editing the Search/Replace block field.


Binary Mode Cancel Button
Cancel: Abort the operation and return to the main window.


Binary Mode Help Button
Help Button: 'Yep, this activates the online help.


Binary Mode Paste Button
Paste Button: Pastes the current content of the clipboard into the Search/Replace Block field.


Binary Mode Paste Button
Double All \s:

The \ character is used to input special (binary) characters. To use a literal \ character (for example in a path), you must enter it as \\. This button will facilitate that by parsing the current text entered in the Search/Replace block field and changing all \s to \\.


Binary Mode - Use Search String
Use Search String:

When checked, all normal search functions are available. In most cases, this is the setting you will use. The Special Search Operation radio button area shown here is not available when editing a binary replacement string.


Binary Mode - Add to Top of File
Add to Top of File:

When checked, Search and Replace will insert the string in the Replace field on the main screen to the top of each file found. This prepend operation takes precedence over normal searches and when this field is checked, the Binary Search Block field will notify you accordingly. The Special Search Operation radio button area shown here is not available when editing a binary replacement string.


Binary Mode - Add to Bottom of File
Add to Bottom of File:

When checked, Search and Replace will insert the string in the Replace field on the main screen to the bottom of each file found. This append operation takes precedence over normal searches and when this field is checked, the Binary Search Block field will notify you accordingly. The Special Search Operation radio button area shown here is not available when editing a binary replacement string.


Special (Binary) Characters: Using
Using Special Characters

You can process (either Search for or Search and Replace) binary characters, line feeds (in DOS CR LF combinations - \r\n), tabs, etc by using the Binary Mode dialog which is available from the [image] buttons next to the Search and Replace String fields in the main window and the Script Editor.

The most important special characters are \r\n (the DOS linefeed sequence), \r (the MAC linefeed sequence), \n (the UNIX linefeed sequence), \t (the TAB character) and \\ (note literal \ characters MUST be doubled for the parser to work correctly). Since you can use the Binary Mode dialog with Regular Expressions, see the Regular Expression Support for additional special characters.

Note: If you have a search/replace where you want to span one or more lines but are not concerned with CR LF's or Tab's per se, consider using the *[] regular expression search operator.

Here is the list of Special characters:

Representation	Description
\0x00	Character 0
\0x01	Character 1
\0x02	Character 2
\0x03	Character 3
\0x04	Character 4
\0x05	Character 5
\0x06	Character 6
\a	ASCII Bell characters
\b	ASCII Backspace character
\t	TAB
\n	Line Feed (See Note)
\v	Vertical TAB
\f	Form Feed
\r	Carriage Return (See Note)
\0x0e	Character 14
\0x0f	Character 15
\0x10	Character 16
\0x11	Character 17
\0x12	Character 18
\0x13	Character 19
\0x14	Character 20
0x\15	Character 21
0x\16	Character 22
\0x17	Character 23
\0x18	Character 24
\0x19	Character 25
\0x1a	Character 26
\0x1b	Character 27 (ESC char)
\0x1c	Character 28
\0x1d	Character 29
\0x1e	Character 30
\0x1f	Character 31
	(space)
!	!
\"	"
#	#
$	$
%	%
&	&
\'	'
(	(
)	)
*	*
+	+
,	,
-	-
.	.
/	/
0	0
1	1
2	2
3	3
4	4
5	5
6	6
7	7
8	8
9	9
:	:
;	;
<	<
=	=
>	>
\?	?
@	@
A	A
B	B
C	C
D	D
E	E
F	F
G	G
H	H
I	I
J	J
K	K
L	L
M	M
N	N
O	O
P	P
Q	Q
R	R
S	S
T	T
U	U
V	V
W	W
X	X
Y	Y
Z	Z
[	[
\\	\
]	]
^	^
_	_
`	`
a	a
b	b
c	c
d	d
e	e
f	f
g	g
h	h
I	I
j	j
k	k
l	l
m	m
n	n
o	o
p	p
q	q
r	r
s	s
t	t
u	u
v	v
w	w
x	x
y	y
z	z
{	{
|	|
}	}
~	~
\0x7f	Character 127
\0x80	Character 128
\0x81	Character 129
\0x82	Character 130
\0x83	Character 131
\0x84	Character 132
\0x85	Character 133
\0x86	Character 134
\0x87	Character 135
\0x88	Character 136
\0x89	Character 137
\0x8a	Character 138
\0x8b	Character 139
\0x8c	Character 140
\0x8d	Character 141
\0x8e	Character 142
\0x8f	Character 143
\0x90	Character 144
\0x91	Character 145
\0x92	Character 146
\0x93	Character 147
\0x94	Character 148
\0x95	Character 149
\0x96	Character 150
\0x97	Character 151
\0x98	Character 152
\0x99	Character 153
\0x9a	Character 154
\0x9b	Character 155
\0x9c	Character 156
\0x9d	Character 157
\0x9e	Character 158
\0x9f	Character 159
\0xa0	Character 160
\0xa1	Character 161
\0xa2	¢
\0xa3	£
\0xa4	¤
\0xa5	¥
\0xa6	¦
\0xa7	§
\0xa8	¨
\0xa9	©
\0xaa	ª
\0xab	«
\0xac	¬
\0xad	­
\0xae	®
\0xaf	¯
\0xb0	°
\0xb1	±
\0xb2	²
\0xb3	³
\0xb4	´
\0xb5	µ
\0xb6	¶
\0xb7	·
\0xb8	¸
\0xb9	¹
\0xba	º
\0xbb	»
\0xbc	¼
\0xbd	½
\0xbe	¾
\0xbf	¿
À	À
Á	Á
Â	Â
Ã	Ã
Ä	Ä
Å	Å
Æ	Æ
Ç	Ç
È	È
É	É
Ê	Ê
Ë	Ë
Ì	Ì
Í	Í
Î	Î
Ï	Ï
Ð	Ð
Ñ	Ñ
Ò	Ò
Ó	Ó
Ô	Ô
Õ	Õ
Ö	Ö
\xd7	Character 215
Ø	Ø
Ù	Ù
Ú	Ú
Û	Û
Ü	Ü
Ý	Ý
Þ	Þ
ß	ß
à	à
á	á
â	â
ã	ã
ä	ä
å	å
æ	æ
ç	ç
è	è
é	é
ê	ê
ë	ë
ì	ì
í	í
î	î
ï	ï
ð	ð
ñ	ñ
ò	ò
ó	ó
ô	ô
õ	õ
ö	ö
0xf7	Character 247
ø	ø
ù	ù
ú	ú
û	û
ü	ü
ý	ý
þ	þ
ÿ	ÿ


LFCR
Note: In DOS \r\n constitute a line feed. In UNIX, \n alone is used.


Prepend - Append Confirmation Dialog
Prepend & Append Confirmation Dialog

This confirmation dialog allows you to confirm whether or not to perform prepend and append replacements (see Binary Mode Editor) when replacement prompts are set to "Prompt on All" (see Replace Options). The action of the buttons is:

Yes Button: The pending prepend or append is readied. You will receive an additional replacement confirmation prompt as the replacement is made. You may cancel the replacement in the second confirmation dialog by clicking the "No" button. If you chose the "Cancel" button in the second replace confirmation dialog, the entire operation will be cancelled.

Yes to All Button: All prepends or appends are performed in all remaining files that meet your file mask, path, and filter criteria. No additional prompts will be offered.

No Button: The pending prepend or append is canceled. If there is only one file that meets your mask, path, & filter settings, the operation ends.

Cancel Button: Aborts all remaining prepend or append replacements.


Scripts: Overview
Script Dialog

The Script dialog allows you to create and edit Search and Replace scripts. You can use a script to: a) specify multiple search/replace combinations for processing, b) save Search or Replace strings for later use, or, c) process multiple drives/directories and/or file masks. You can override the Search and Replace strings in the main dialog and still use the Masks and Paths, or you can override anything but the list of paths, or you can only use the Search/Replace list on a path and mask specified in the main window. The Advanced Script settings and boolean Expression Evaluator, which are especially useful for scripts run from the command line, let you specify further the files processed during a script operation. Scripts are stored in ASCII text format so that they can be edited or printed with any text editor. Text comments can be added to scripts via the Advanced Script dialog. You can also add comments manually on the [Search] and [Replace] lines in scripts (see Format of Script Files). To convert scripts created with earlier versions of the program, load them and then save them using the same name.

Script Help Topics

Graphic View of the Script Editor
Script Editor - Multiple Search and Replace Items in Scripts
Script Editor - Multiple Paths and File Masks Items in Scripts
Script Editor - Script File Operations
Advanced Script Settings
Expression Evaluator
Expression Evaluator & Replacements
Format of Script Files

Notes:

 You can enter Search strings only, both Search and Replace strings, Path and mask strings only, or all the fields in a script. You can also override some of the values from the main window by entering new Search and Replace strings or new Path and Mask strings.

 If you create a script containing only a mask & path, you should enter at least one dummy search string in the search string section of the editor. You can also override some of the values from the main window by entering new Search and Replace strings or new Path and Mask strings.

 When a script is active, the Search, Replace, File Mask, and Path fields in the Search and Replace main window will change to reflect the script in use. For example, given a script named, example.srs, which only has settings for a search string, the Search field in the main window will change to read "Use Script file: d:\example.srs". If example.srs also involves a replace string and a file mask, the Replace and File Mask fields will also change to read, "Use Script file: d:\example.srs".


Scripts: Multiple Search and Replace Items
Script Editor: Multiple Search and Replace Items

Outlined here are the fields in the upper half of the script editor. These fields are used to create one or more search (and replace) strings for a script. The search & replace entries are created in conjunction with one or more paths & files masks in the lower half of the script editor.

 Also see

Search String field: Enter the string to search for in this field. Selecting a line in the Search/Replace List will display the information for that line and allow you to edit it. When you are done with this field and with the settings for the Replace string, Case Sensitive, Regular Expression and Match Whole Word, click "Apply" to save the information to your script.

Search String Binary Mode button ( [image]): Click this to activate the Binary Mode dialog to create searches that span multiple lines or involve special characters for the Search field. When you are done creating the string, "Binary mode -->>", is displayed in the search string area. If you want to double check your entry or make changes, click the button again.

Replace String field: Enter the replacement string in this field. Special Replacement Operators can also be used here. Selecting a line in the Search/Replace List will display the information for that line and allow you to edit it. When you are done with this field and with the settings for the Search string, Case Sensitive, Regular Expression and Match Whole Word, click "Apply" to save the information to your script.

Replace String Binary Mode button ( [image]): The operation here parallels the Search String binary mode editor. Click this to activate the Binary Mode dialog to a multiple line and/or special character Replace String. When you are done creating the string, "Binary mode -->>" is displayed. To view the string later, click the button again.

Case Sensitive field: Check this to make the search case sensitive. Uncheck it if you want to search regardless of case. To save the information for the current row when you are done, click "Apply" (in the same group).

Match Whole Word: Check this field to search for the exact word or phrase specified (enclosed by whitespace). For example, if this option is on and you look for "Window", the program will find it in the phrase "...use the Window menu..." but not in the phrase "...Windows 95...". If this option is not checked, both occurrences will be found. To save the information for the current row when you are done, click Apply (in the same group). Note that this field is not available when Regular Expressions are turned on.

Regular Expression field: Check this field if you want to use a regular expression. Case sensitive and binary mode can be used in conjunction with this type of search. See Regular Expressions for more information on the syntax supported. To save the information for the current row when you are done, click "Apply" (in the same group).

Search/Replace List: The search/replace items currently in the script are displayed here. To change a specific line, select it in this list. The information for the line will then be displayed and you can then modify or delete it as you wish.

Apply button for Search/Replace List: Click this button to save the information for the currently selected line.

Remove button for Search/Replace List: Click this button to delete the information for the currently selected line.

Remove All button for Search/Replace List: Click this button to remove all the Search/Replace lines (to start a new script for example).

Move Up button for Search/Replace List: Click this button to move the information for the currently selected line up by one line.

Move Down button for Search/Replace List: Click this button to move the information for the currently selected line down by one line.

Insert button for Search/Replace List: Click this button to insert a new Search/Replace line above the currently selected line.


Scripts: Also See Popup 1
Graphic View of the Script Editor
Multiple Paths and File Masks in Scripts
Multiple Search and Replace Items in Scripts
Script File Operations
Advanced Script Settings
Expression Evaluator
Expression Evaluator & Replacements
Format of Script Files


Scripts: Multiple Paths & File Masks
Script Editor: Multiple Paths and File Masks

Outlined here are the fields in the lower half of the script editor. These fields are used to create one or more file masks and path combinations for a script. The file mask & path are created in conjunction with one or more search & replace strings in the upper half of the script editor.

 Also see

File Mask field: Enter one or more include &/or exclude File Masks to specify the files &/or subdirectories to search. File and directory masks can be combined to create complex file mask expressions to include files in some subdirectories while excluding those in others. The wildcards characters * and ? may be used in a manner similar to the DOS dir command, e.g., *.*;*.txt;*.doc;*.??1. More than one mask can be specified by using a semicolon separator (see above). Exclude masks use the ~ character to denote a mask NOT to search (e.g., *.*;~*.swp;~*.exe;~*.dll). To specify a ~ character as part of the file mask, use \~ to denote the literal (e.g., *.*;\~*.tmp). If you have "Search ZIP Files" turned on, the mask will be applied to files inside of ZIPs as well as ordinary files in the path specified in the path field. Your last few search file masks are saved for you and you can find them in the combo box list ( [image]). See File Masks for more information.

File Mask Dialog button ( [image]): Click this to activate the Include Exclude Files & Directories dialog. This dialog is used to help you generate complex mask expressions that will be inserted into the file mask field.

Path field: Enter the path where files to search reside. You may type it by hand, navigate to it by using the Browse button ( [image]), or select a previously used path from the combo list ( [image]). You can use Complex File Mask expressions to further specify which files in the path will be processed by the script. You can also use the Advance Script Options button or the Options button on the Search and Replace main window to establish Filters to further specify the files to be processed. To save the information for the current line, click "Apply" (in the same group).

Path Browse button ( [image]): Click to select the path where files to search reside. The Select Path dialog will be displayed to allow you to visually select the path. If the Path field (described above) contains a valid path, it will be your starting path in the path browser. Otherwise, the current path will be used. To save the information for the current line, click "Apply" (in the same group).

Path/Mask List: The file mask/path items currently in the script are displayed here. To change a specific line, select it in this list. The information for the line will then be displayed and you can then modify or delete it as you wish.

Apply button for Path/Mask List: Click this button to save the information for the currently selected line.

Remove button for Path/Mask List: Click this button to delete the information for the currently selected line.

Remove All button for Path/Mask List: Click this button to remove all the Path/Mask lines (to start a new script for example).

Move Up button for Path/Mask List: Click this button to move the information for the currently selected row up by one row.

Move Down button for Path/Mask List: Click this button to move the information for the currently selected row down by one row.

Insert button for Path/Mask List: Click this button to insert a new Path/Mask row above the currently selected row.


Scripts: Script File Operations
Script Editor: Script File Operations

Outlined here are the buttons across the bottom of the script editor dialog.

 Also see

Save As button: Click to save the created/modified script to disk.

Load button: Click to load a script from disk for editing or using Search, Search and Replace, Touch or File Find.

Use Script button: Click to use the script for Search, Search and Replace, Touch or File Find. You can override several of the script settings in the main window (see Scripts for details).

Cancel button: Exits the dialog without using the script settings. If you made changes to a script, you are asked whether you want to save the information. The ESC key also cancels.

Advanced Button: Activates the Advanced Script Settings dialog.


Scripts: Advanced Script Settings
Script Editor: Advanced Script Settings

 Also see

Advanced Script Settings allow for precise control over the files to be processed and the program options functions in effect during the script. File selection for the script is determined first by the path and file mask fields in the Script Editor and then by the boolean Expression Evaluator in the "Process File When Expression is Non-Zero" field (also see below).

Advanced Script Settings also allow you to supply comment text to help you keep track of your scripts.

Note: Advanced Script Settings are particularly useful for scripts run via batch files using the command line switches for Search and Replace. They are designed to be used with replacement prompting turned off. Be sure to read the help section on Advanced Expressions and Replacement Operations for information about the behavior of replacement prompts when a complex expression is in effect and advice on debugging your expressions.

To activate the Advanced Script Settings dialog, click on the "Advanced" button in the Script Editor.

Details on the Advanced Script Settings Fields:

Also see Graphic View of the Advanced Script Dialog

Script Description: A descriptive comment of your choice may be entered here.

Process File When Expression is Non-Zero: This field is the boolean "Expression Evaluator", which is used to determine which files among those meeting the path and file mask criteria are actually processed by your script. The variables in this field are labeled E1, E2 ... En, where n is the number of search/replace strings in your script. Under the default OR expression (e.g., E1 OR E2) all files meeting the path, file mask, and filter criteria would be processed. Other combinations of operators and variables in the expression allows you to process only certain files within the domain of possible files according to your path and file mask criteria. When the result of the expression is 1, a file will be processed.

The field may contain: a) the AND OR NOT < > <= >+ = != + - * / operators, b) E1, E2, E3,... En to denote the search & replace string pairs in the script, c) numeric values denoting the number of replacement opportunities for a variable (e.g., E2 >= 1), d) comparisons of the numeric values of the number of replacement opportunities (e.g., E1 AND (E2 != (E3))), and, e) arithmetic expressions on the values of the En variables (e.g., (E1 + E2) = (+5)).

See Expression Evaluator for details.

Options Button: Opens an Options Dialog to allow you to establish settings for the script. If any changes are made it is assumed you want the script to override the current options for Search & Replace and the "Use Program Options" checkbox to the right of this button will automatically uncheck. Options settings for a script only affect the script -- they do not modify saved settings for the program itself. To remove script-based options and use the options in effect for Search & Replace, check mark "Use Program Options" and the special settings for the script will be removed when the script is saved.

Use Program Options Checkbox: When checked, the script will use the current Options in effect for Search & Replace. When unchecked, the script temporarily overrides the default settings according to the changes made via the Options Button to the left of this field. Note that if you uncheck this field but do not make changes via the Options Button to the left, no options settings will be saved in the script. To remove options for a script, check this field and the settings will be removed when the script is saved.

Search Subdirectories Checkbox: By default, scripts follow the "Search Subdirectories" settings on the Main Window. Check this box if you want your script to search subdirectories regardless of the setting in the Main Window. This field is dim if "Use Program Options" is checked.

OK Button: Closes the Advanced Script Settings dialog.

Cancel Button: Cancels any changes. The ESC also closes the dialog.

Help Button: Activates the help topic for the Script Editor.


Scripts: Expression Evaluator

 Also see

Described below is a general introduction about the Expression Evaluator, some specific notes, and some basic examples.

Introduction:

Expression Evaluator Field

The "Expression Evaluator" is the "Process file when expression is non-zero" field in the Advanced Script Settings dialog. The expression in this field determines which files among those meeting the file mask, path, and filter criteria are actually processed by your script. If the result of the expression is 1 for a file, that file will be processed. Under the default OR expression, all files meeting the file mask, path, and filter criteria are processed because the value of the expression would be 1 for each file. Other combinations of operators and variables in the expression would allow you to process only certain files within the domain of possible files according to your file masks, path, & filters.

The variables E1, E2, ... En reference the search/replace string pairs in the script. A script with 3 strings would have E1, E2, & E3 available.

The valid operators are:

AND OR NOT < > <= >= >+ = != + - * /

The default expression is an OR statement, e.g.,

E1 OR E3 OR E3

Numeric values may be used in conjunction with variables to denote the number of replacement opportunities in a file. For example, the expression

E1 AND (E2 = 4)

would process only those files where the first search & replace pair could occur one (or more) times and the second search & replace pair could occur exactly 4 times.

Notes on the Expression Evaluator:

 Advanced Script Settings are especially useful for scripts run via batch files using the command line switches for Search and Replace. They are designed to be used with replacement prompting turned off. Be sure to read the help section on Advanced Expressions and Replacement Operations for information about the behavior of replacement prompts when a complex expression is in effect and advice on debugging your expressions.

 Unary versions of the + and - operators must be enclosed in parentheses, e.g., (-1).

 You can compare one string to another, e.g.,

E1 AND NOT(E2 != (E3)))
E1 AND NOT(E2=1 or (E3 != (-1)))

 You can use arithmetic operations involving En values, e.g.,

(E1 * 2) = E3

 E1 and (E1 >= 1) are equivalent. Conversely, NOT E1 and (E1 = 0) are equivalent.

 Operators are parsed in the following order:
1) (
2) * /
3) + -
4) = != > >= < <=
5) NOT
6) AND
7) OR

 Search and Replace will check the expression syntax for unbalanced parentheses, invalid variables, and missing or incorrect operators. Upon errors involving invalid variables, the program will change the expression to an OR statement matching the number of search strings in the script. For example, say you create a script manually that contains 2 search strings and the expression E1 AND (E2 != E3). When the script is loaded into Search and Replace, the program will notify you of the error involving variable E3 (it should not be present in a 2 string script) and the expression will be changed to E1 OR E2.

 By using the "Move Up" and "Move Down" buttons on the main Script Editor dialog to rearrange the search & replace strings, the strings associated with the En variables in the Expression Evaluator will change. Depending on your expression, rearranging strings may be more convenient than rewriting the expression itself.

Some Basic Expression Evaluator Examples:

(Note: These examples assume the user either: a) has Replace Prompts turned off or b) does not "Skip" any replacements if Replace Prompts are turned on. See Advanced Expressions and Replacement Operations for more information about the possible influence of "Skip(s)" on expressions involving numeric values.)

FILE CONTENTS

File 1	File 2	File 3
JILL JACK JOHN	JACK CAROL	JILL JACK JOHN
Script Search Strings:	E1 = JILL E2 = JACK E3 = JOHN E4 = CAROL
Expression Evaluator:	E2 AND E4
Files That Would Be Processed:	FILE 2
_______________________________________________________

FILE CONTENTS

File 1	File 2	File 3
JILL JACK JOHN	JACK CAROL	JILL JACK JOHN
Script Search Strings:	E1 = JILL E2 = JACK E3 = JOHN E4 = CAROL
Expression Evaluator:	E1 AND E4
Files That Would Be Processed:	(none)
_______________________________________________________

FILE CONTENTS

File 1	File 2	File 3
12/18/94 Page 95 www.funduc.com	12/01/95 12/15/95	12/19/95 www.funduc.com
Script Search Strings:   (Note: E2 is a Regular Expression)	E1 = 12 E2 = /*[0-9]/  E3 = 95 E4 = www.funduc.com
Expression Evaluator:	E1 AND E2 AND ((E3 >= 2 OR E4)
Files That Would Be Processed:	FILE2 FILE3
________________________________________________________


Scripts: Expression Evaluator & Replacement Prompts

 Also see

Advanced Script Settings and the Expression Evaluator are designed to be especially useful for scripts run via batch files using command line switches. As such, the advanced script functions are geared toward complex operators that are run with replacement prompts turned off for the script via the Options button on the Advanced Script Settings dialog.

It is perfectly OK to use Replacement Prompts during advanced operations. However, you should note that the behavior of replacement prompts during search & replace operations involving complex expressions differs from those using a standard OR expression such as E1 OR E2.

First, when replacement prompts are on, prompts are offered for search hits in every file meeting the file mask, path, and filter criteria, even though only some of those files might satisfy the criteria in the Expression Evaluator. Responding affirmatively to replacement confirmations in files that do not satisfy the expression will have no effect on those files. Regardless of how you respond to replacement confirmation prompts, replacements take place only in files that actually satisfy the expression!

Second, if you have replacement prompts enabled and respond "Skip" to a replacement that initially satisfies your expression, the "Skip" may influence the result of your expression. Number values in expressions are based on the number of search & replace opportunities in a file. Since a "Skip" eliminates one replacement opportunity, "Skip(s)" may impact on expressions that make use of number values. For example, given the expression (E1 >= 2) and a file having exactly 2 search & replace opportunities. A manual "Skip" in response to either of the replacement prompts eliminates 1 search & replace opportunity. The file would therefore no longer satisfy the expression (E1 >= 2). This in turn means that no replacements would be made, even if you respond "Replace This" to the other prompt.

In some cases you may intentionally wish to enable replacement prompts in order to capitalize on the above behavior as this provides a way to have 'on the fly' control over your expressions.

Regarding debugging expressions, you should note that search-only operations report hits only in files that actually satisfy the expression. Therefore, to debug your script in advance of a search & replace operation and identify the specific files that will be selected by your expression, run a search-only operation. Another debugging tactic is to intentionally run a search & replace operation with confirmations set to "Prompt on all". This allows you to see all search/replace strings in-context in all files.

The table below outlines these characteristics:

REPLACEMENT PROMPTS & ADVANCED SCRIPT SETTINGS

Given the following:
	Contents of File #1:	12/18/94 Page 12
	Contents of File #2:	12/19/95 www.funduc.com
	Script Search Strings:	E1 = 12 E2 = funduc
	Expression Evaluator:	E1 AND E2

Results of the following scenarios would be:

	Operation	Results
	Search-Only:	The strings "12" and "funduc" would be reported in File #2 only.
	Unprompted Search & Replace:	Replacements would be made in File #2 only.
	Prompted Search & Replace: (Where user selects "Replace This" in each instance)	You would be prompted to replace the "12" in File #1 and "12" & "funduc" in File #2. Even if you answer "Replace This" to the "12" in File #1, File #1 would not be modified because it does not satisfy the Expression, (E1 AND E2). File #2 would be modified because you allowed all replacements to occur in File #2.
	Prompted Search & Replace: (Where user selects "Skip" to either of the prompts for File #2)	No replacements would occur in File #1 (as above). No replacements would occur in File #2 because a skip in response to either prompt for File #2 means it no longer satisfies the expression (E1 AND E2).
_______________________________________________________________


Scripts: Format of Script Files
Script Editor: Format of Script Files

 Also see

Format of the Script file:  Scripts are saved as ASCII files. The safest way to create a valid script is to use the Script dialog, then to edit the resulting file and perhaps to cut and paste to add new steps. A sample script file using Advanced Script Settings looks like this:

[Script for Search and Replace]
This is an example script using alternate program options for the script. The text you are reading here is the script comment added via the Advanced Script Dialog.
[Expression]
E1 AND E2
[Options]
Search_subdir=0
Prompt_flag=0
Output_File=
String Color=255
Show_Files=1
Max Items Saved=10
File Color=16711680
Backup Path=E:\TEMP\SRBACK\REPL
Num Detail Entries=20
Default Viewer=notepad.exe
Before Hit=<
After Hit=>
Max Reg Expr=512
Write to Backup Dir=0
Unzip Dir=E:\TEMP\SRBACK\ZIPS\
Show Files Without Hits=1
Display Replace String=1
Display File Stats=1
Min Size Filter=0
Max Size Filter=0
Min Date Filter=0
Max Date Filter=0
Keep file time stamp=0
[Search]          This comment added manually to a search line.
Search string #1
[Replace /b]      This comment added manually to a replace line.
Replacement string #1
[Search /bix]
Search string #2
[Replace]
Replacement string #2
[Path]
c:\*.ini
[Path]
d:\work\*.txt
[End of Search and Replace Script]

Notes:

 The following tags must be at the beginning and end of the script:[Script for Search and Replace] and [End of Search and Replace Script].

 Comment text must immediately follow the [Script for Search and Replace] section.

 The order of section headings must follow that outlined above.

 The [Options] section is not required. If you create a script using a text editor and wish to set only one or a few options, it is OK to enter only those specific options. Scripts saved via Search and Replace will have all options saved with the script.

 Search strings can be entered on the next line after a [Search] tag. To enter the Regular Expression, Case Sensitive off (or Insensitive), Whole Word Only and Binary Mode, you must use the /x /i /w /b flags respectively. The flags are case insensitive. This is similar to the flags for Command Line Parameters.

 Replace strings can be entered on the next line after a [Replace] tag. You can only use the /b flag for Binary Mode with this tag since all other tags are specified on the Search field.

 Path and mask strings can be entered on the next line after a [Path] tag. No flags can be used with this tag. The mask string must be entered right after the path string and a \ character is expected between them. For example c:\*.ini will use Path C:\ and Mask *.ini. If you turn on the Search Subdirectories box on the main window, all INI files on the C: drive would be processed.

 You can enter Search strings only, both Search and Replace strings, Path and mask strings only, or all the fields in a script. You can also override some of the values from the main window by entering new Search and Replace strings or new Path and Mask strings. As new versions come out, more functionality will be added in this area.

 When a script is active, the Search, Replace, File Mask, and Path fields in the Search and Replace main window will change to reflect the script in use. For example, given a script named, example.srs, which only has settings for a search string, the Search field in the main window will change to read "Use Script file: d:\example.srs". If example.srs also involved a replace string and a file mask, the Replace and File Mask fields would also change to read, "Use Script file: d:\example.srs".


Scripts: Graphic View of Editor
Script Editor Graphic View
Click on the graphic for help on the various functions.                                                            Also see


Scripts: Graphic View Also See Popup1
Multiple Search and Replace Items in Scripts
Multiple Paths and File Masks Items in Scripts
Script File Operations
Advanced Script Settings
Expression Evaluator
Expression Evaluator & Replacements
Format of Script Files


Script Search String (P)
Search String:

Enter the string to search for in this field or select a previous string from the combo list ( [image]). The search string can be a simple search or a regular expression (be sure to check the 'Regular Expression' checkbox). To create a binary search using special characters, click the [image] button to the right of this field. If you create a Binary search, the string, "Binary mode -->>", is displayed in the search string field. When you are done with this field, the Replace string and the Case Sensitive, Regular Expression and Match Whole Word settings, click "Apply" to save the information to your script.

Note that in the current example, the highlighted line Search/Replace list makes use of Regular Expression search using the * operator.


Script Replace String (P)
Replace String:

Enter replacement string in this field or select a previous string from the combo list ( [image]). The string you enter can be a simple replacement, a regular expression (be sure to check the 'Regular Expression' checkbox), or a replacement involving special replacement operators. To create a binary replacement using special characters, click the [image] button to the right of this field. If you create a Binary replacement, the string, "Binary mode -->>", is displayed in the replace string field. When you are done with this field, the Search string and the Case Sensitive, Regular Expression and Match Whole Word settings, click "Apply" to save the information to your script. Special Replacement Operators are valid in script replacements strings.

Note that in the current example, the highlighted line in the Search/Replace list makes use of Regular Expression replacement using the %1 operator to include the search results yielded by the * search operator (see the Search String) in the replacements.


Script SR List (P)
Search/Replace List:

The list of Search/Replace combinations established for the current script. Two assignments are listed here. To change an existing assignment, highlight it in the Search/Replace list, make changes to either the Search or Replace field, and click on the "Apply" button. In the example modeled here, a binary operation is reflected by the phrase "Binary Mode ->>" for the second search string.


Script Case (P)
Case Sensitive Field:

Check this if you want the search to be case sensitive. Uncheck it if you want to search regardless of case. To save the information for the current line, click the Search/Replace "Apply" Button.


Script Whole Word (P)
Match Whole Word Field:

Check this field if you want to look for the exact word or phrase specified (enclosed by whitespace). For example, if this option is on and you look for "Window", the program will find it in the phrase "...use the Window menu..." but not in the phrase "...Windows 95...". If this option is not checked, both occurrences will be found. To save the information for the current line, click the "Apply" Button. Note that in the example here, Match Whole Word is not available because the Regular Expression field is checked.


Script SR Reg Exp (P)
Regular Expression Field:

Check this field use a regular expression search &/or replacement. Case sensitive and binary mode may be used in conjunction with this type of search. See Regular Expressions for more information on the syntax supported. To save the information for the current line, click the Search/Replace "Apply" Button.


Script SR Binary (P)
Binary Mode Button:

Click these buttons to activate the Binary Mode dialog for the respective Search or Replace strings. The Binary Mode dialog is used to for operations that span multiple lines or use special characters. When you are done, "Binary mode -->>", is displayed in the string area. To double check your entry or make changes, click the button again. Be sure to click the Search/Replace "Apply" Button to enter your changes into the script. Special Replacement Operators may be combined in binary operations.


Script SR List Apply (P)
Search/Replace Apply Button:

Click this to commit the information for the highlighted search/replace line to the script.


Script SR List Remove (P)
Search/Replace Remove Button:

Click this to delete the information for the highlighted search/replace line from the script.


Script SR List Remove All (P)
Search/Replace Remove All:

Click this to remove all the existing Search/Replace combinations.


Script SR List Up (P)
Search/Replace Move Up:

Click this to move the information for the highlighted line up by one line.


Script SR List Down (P)
Search/Replace Move Down:

Click this to move the information for the highlighted line down by one line.


Script SR List Insert (P)
Search/Replace Insert Button:

Click this to insert a new Search/Replace line above the currently selected line.


Script Mask (P)
File Mask field:

This is the file mask for the search/replace that is currently highlighted in the Search/Replace list (if any are present). File and directory masks can be combined to create complex file mask expressions to include files in some subdirectories while excluding those in others. The wildcards characters * and ? may be used in a manner similar to the DOS dir command, e.g., *.*;*.txt;*.doc;*.??1. More than one mask can be specified by using a semicolon separator (see above). Exclude masks use the ~ character to denote a mask NOT to search (e.g., *.*;~*.swp;~*.exe;~*.dll). To specify a ~ character as part of the file mask, use \~ to denote the literal (e.g., *.*;\~*.tmp). If you have "Search ZIP Files" turned on, the mask will be applied to files inside of ZIPs as well as ordinary files in the path specified in the path field. To save the information for the current line, click Path/Mask "Apply" Button.


Script Incl Excl Dialog (P)
File Mask Dialog button:

Click this to activate the Include Exclude Files & Directories dialog. This dialog is used to help you generate complex mask expressions that will be inserted into the file mask field.


Script Path (P)
Path/Mask Path field:

This is the path for the search/replace that is currently highlighted in the Search/Replace list (if any are present). You may type it by hand or navigate to it by using the Browse button ( [image]). You can use Complex File Mask expressions to further specify which files in the path will be processed by the script. You can also use the Advance Script Options button or the Options button on the Search and Replace main window to establish Filters to further specify the files to be processed. Click the File/Path "Apply" button to commit your choice to the script.


Script Path Browser (P)
Path/Mask Browse Button:

Click this to use the path browser to select the path where files to search reside. If the Path field currently contains a valid path, it will be your starting path in the dialog. Otherwise, the current path will be used.


Script Path Apply (P)
Path/Mask Apply Button: Click this to commit the information for the highlighted selected line.


Script Path Remove (P)
Path/Mask Remove Button: Click this to delete the information for the highlighted line.


Script Path Remove All (P)
Path/Mask Remove All Button: Click this to remove all the Path/Mask lines.


Script Path Up (P)
Path/Mask Move Up Button: Click this to move the highlighted line in the Path/Mask list up by one.


Script Path Down (P)
Path/Mask Move Down Button: Click this to move the highlighted line Path/Mask list down by one.


Script Path Insert (P)
Path/Mask Insert Button:

Click this to insert a new Path/Mask line above the highlighted line. Note that depending on the focus in the Search/Replace list area, clicking here may affect the Search/Replace list. If you want to insert an additional path and not disturb already established Search/Replace/Path/Mask combos, first move the focus in the Search/Replace list off exiting items by either: a) clicking the Search/Replace "Insert" button (the Insert button in the upper ½ of the Script Editor) to create a blank Search/Replace item or b) clicking anywhere in the Search/Replace List area below the last item in the list.


Script Path List (P)
Path/Mask List:

The list of path/mask combinations established for the current script. Two assignments are listed here. To change an existing assignment, highlight it in the path/mask list, make changes on the File Mask(s) or Path lines, and click on Apply.


Script Save As (P)
Save As Button:

Click this to save the created/modified script to disk via a standard Save As dialog.


Script Load (P)
Load Button: Click this to load an existing script from disk for use &/or editing.


Script Use (P)
Use Script Button:

Click this button to use the script for Search, Search and Replace, Touch or File Find. You can override several of the script settings in the main window (see Scripts for details).


Script Cancel (P)
Cancel Button:

Exits the dialog without using the script settings. If you made changes to a script, a confirmation box asks you whether you want to save the information. The ESC key also cancels.


Scripts: Graphic View of Advanced Settings
Script Editor Graphic View of Advanced Settings
Click on the graphic for help on the various functions.                                                           Also see


Script Advanced Settings Description
Script Description: Enter comment text of your choice.


Script Advanced Settings Expression Evaluator
Process File When Expression is Non-Zero:

This field is the boolean "Expression Evaluator", which is used to determine which files among those meeting the file mask, path, and filter criteria are actually processed by your script. The variables in this field are labeled E1, E2 ... En, where n is the number of search/replace strings in your script. Under the default OR expression (e.g., E1 OR E2) all files meeting the file mask, path, and criteria would be processed. Other combinations of operators and variables in the expression allows you to process only certain files within the domain of possible files according to your path and file mask criteria. When the result of the expression is 1, a file will be processed.

The field may contain: a) the AND OR NOT < > <= >+ = != + - * / operators, b) E1, E2, E3,... En to denote the search & replace string pairs in the script, c) numeric values denoting the number of replacement opportunities for a variable (e.g., E2 >= 1), d) comparisons of the numeric values of the number of replacement opportunities (e.g., E1 AND (E2 != (E3))), and, e) arithmetic expressions on the values of the En variables (e.g., (E1 + E2) = (+5)).

See Expression Evaluator for details.


Script Advanced Settings Options Button
Script Options Button:

Opens an Options Dialog to allow you to establish Options settings for the script. If any changes are made it is assumed you want the script to override the current settings for Search & Replace and the "Use Program Options" checkbox to the right of this button will automatically uncheck. Options settings for a script only affect the script --they do not modify saved settings for the program itself. To remove script-based options and use the options in effect for Search & Replace, check mark "Use Program Options" and the special settings for the script will be removed when the script is saved.


Script Advanced Settings Options Checkbox
Use Program Options Checkbox:

When checked, the script will use the current Options in effect for Search & Replace. When unchecked, the script temporarily overrides the settings for the program itself according to the changes made via the Options Button to the left of this field. Note that if you uncheck this field but do not make changes via the Options Button to the left, no options settings will be saved in the script. To remove options for a script, check this field and the settings will be removed when the script is saved.


Script Advanced Settings Search Subdirectories
Search Subdirectories Checkbox:

By default, scripts follow the "Search Subdirectories" settings on the Main Window. Check this box if you want your script to search subdirectories regardless of the setting in the Main Window. This field is dim if "Use Program Options" is checked.


Script Advanced Settings OK Button
OK Button: Closes the Advanced Script Settings dialog.


Script Advanced Settings Cancel Button
Cancel Button: Cancels any changes. The ESC also closes the dialog.


Script Advanced Settings Help Button
Help Button: Activates the help topic for the Script Editor.


Touch Files Dialog

"Touch" allows you to change the time & date stamp and file attributes for the files found by the file mask, path, and filter settings. To use the Touch dialog: a) Enter (or select from combo boxes) one or more file masks and a path, b) Verify your filter options settings for excluding files by file date &/or file size, c) Select "Touch" from the Actions Menu or the Touch button, d) Make your settings in the Touch dialog, e) Click on the OK button to implement your choices.

Click on the graphic below for help on the fields or scroll the screen down for a text description of the Touch dialog fields.

Important Note: Touch operates on all files described by the file mask, path, and filter criteria. Touch does not distinguish files by the search or replace fields.

Details on the Touch Dialog fields:

Set Files' Date/Time Only: Mark this field if you only want to change the time & date stamp for the files. This field is mutually exclusive with the "Set Files' Attributes Only" and the "Set Date/Time and Attributes" fields.

Also Set Creation Date: Mark this field to also change the Creation date. This field is dim and not available in the Win3x version.

Also Set Access Date: Mark this field to also change the Last Access date. This field is dim and not available in the Win3x version.

Date Field: Enter the date to be used. The date format follows the regional settings for your computer so make your entry in the form as it appears in the field. 00 or 2000 may be used for the year 2000 and above.

Time Fields: Enter the time to be used (in hh:mm or hh:mm:ss format) and AM or PM. Do not use military time.

Set Files' Attributes Only: Mark this field if you only want to change the attributes for the files. This field is mutually exclusive with the "Set Files' Date/Time Only" and the "Set Date/Time and Attributes" fields.

Attributes: Mark some or all of the fields. The checkboxes have three choices -- marked, unmarked, and a dim mark. The dim-check choice is used if you want to leave the existing attribute setting for that field unchanged. For example, in the graphic above, the Read Only field is a dim mark. This means that files already having a Read Only attribute setting will remain so. Conversely, those not already set as Read Only will not be set to Read Only. The solid mark in the Archive field means that all files will be set to Archive. The unmarked settings for Hidden & System means that Hidden &/or System attributes, if present for any files, would be removed.

Set Date/Time and Attributes: Mark this field if you want to change both the time/date stamp and the file attributes. This field is mutually exclusive with the "Set Files' Date/Time Only" and the "Set Files' Attributes Only" fields.

OK Button: The dates and times &/or attributes will be set for all the files described by the file mask, path, and filter criteria.

Cancel Button: No files will be touched.

Update Button: The date and time fields will be refreshed using the current date and time according to the PC's clock.

Help Button: 'Bet you know what this does...


Set Files' Date/Time Only
Set Files' Date/Time Only:

Mark this field if you only want to change the time & date stamp for the files. This field is mutually exclusive with the "Set Files' Attributes Only" and the "Set Date/Time and Attributes" fields.


Set Creation Date
Also Set Creation Date:

Mark this field to also change the Creation date. This field is dim and not available in the Win3x version.


Set Access Date
Also Set Access Date:

Mark this field to also change the Last Access date. This field is dim and not available in the Win3x version.


Date Field
Date Field:

Enter the date to be used. The date format follows the regional settings for your computer so make your entry in the form as it appears in the field. 00 or 2000 may be used for the year 2000 and above.


Time Fields
Time Fields:

Enter the time to be used (hh:mm or hh:mm:ss format) and AM or PM. Do not use military time.


Set Files' Attributes Only
Set Files' Attributes Only:

Mark this field if you only want to change the attributes for the files. This field is mutually exclusive with the "Set Files' Date/Time Only" and the "Set Date/Time and Attributes" fields.


File Attributes
File Attributes:

Mark some or all of the fields. The checkboxes have three choices - marked, unmarked, and a dim mark. The dim-check choice is used if you want to leave the attribute setting for that field unchanged. For example, in the example here, the Read Only field is a dim mark. This means that files already having a Read Only attribute setting will remain so. Conversely, those not already set as Read Only will not be set to Read Only. The solid mark in the Archive field means that all files will be set to Archive. The unmarked settings for Hidden & System means that Hidden &/or System attributes, if present for any files, would be removed.


Set Date/Time and Attributes
Set Date/Time and Attributes:

Mark this field if you want to change both the time/date stamp and the file attributes. This field is mutually exclusive with the "Set Files' Date/Time Only" and the "Set Files' Attributes Only" fields.


Touch OK Button
OK Button:

The dates and times &/or attributes will be set for all the files described by the file mask, path, and filter criteria.


Touch Cancel Button
Cancel Button: No files will be touched.


Touch Update Button
Update Button: The date and time fields will be refreshed using the current date and time according to the PC's clock.


Touch Help Button
Help Button: 'Bet you know what this does...


Command Line Parameters

For the Windows 95/NT version, command -line parameters can be used as follows:

/b	Backup path, e.g., /Bc:\temp\srbackup. See Replace Options
/I	Case Insensitive (note that this option is the reverse of what the user interface shows). If not specified, Case Sensitive is assumed.
/x	Regular Expression. If not specified, it is assumed off.
/d	Search Subdirectories. If not specified, it is assumed off.
/w	Match Whole Word (ignored if Regular Expression is used). If not specified, it is assumed off.
/n	"No Prompts". Works only with /r. Note: This resets program options so you should manually restore prompts settings after using /n (see Options dialog).
/rstring	Perform a replace. This can be used either with scripts via /c switch (see below) or by itself with a replace string. If the string contains spaces or / characters, enclose it in double quotes as in /s below. If the string contains " characters, use the \ character to denote the literal. For example, if your replace string contains both quotes and a space, as in "Windows 98", you would use,      /r"\"Windows 98\""
/t	Perform a Touch on the files specified. You can specify a date/time stamp or use the current date/time (default). For the 32-bit version, the user's date format is used and the HH:MM:SSam/pm format is used for time. For the 16-bit version, the same time format is used but the MM/DD/YY or MM/DD/YYYY format is used for date. The Touch dialog is only displayed if the date/time stamp passed on the command line is in the wrong format. The date & time MUST be enclosed in double quotes to work properly, e.g.,      SR32 /pc:\work\*.* /t"01/01/00 1:00:00am".
/sstring	Search String to use. This automatically starts a Search. If the string contains spaces or / characters, enclose it in double quotes as with the /r switch above. If the string contains " characters, use the \ character to denote the literal. For example, if your search string contains both quotes and a space, as in "Windows 95", you would use,      SR32 /S"\"Windows 95\""
/pC:\*.ini;*,txt	Path to search with mask(s) appended after the \. If no path or masks are specified, the last program default is used. The /p switch command line parameter accepts partial paths, including .. characters, e.g.,      /Pc:file.txt or /Ppfile.txt or /P..\test\file.txt or /P\file.txt.
/oresults.txt	Output file to send the search results to. If not specified, the last program default is used (this is specified in the Options dialog).
/cscript.srs	Script file to use. If Replace or Touch is not specified (see above), a Search is performed.
/q	Quit after operation. The Search & Replace window will close after the operation is completed.
Note: The flags can be upper or lower case. The /i /x /d /w flags can be used separately or together in any order. Here are some examples:

SR32 /Oc:\dump.txt /SWindows /Pc:\windows\*.ini /ID

SR32 /I /D /Oc:\dump.txt /SWindows /Pc:\windows\*.ini /ID


Replace Confirmation Dialog

Note: If you are seeing a confirmation during an Advanced Script operation, read over the help section on Replacement Prompts for details about replacement prompts and Advanced Scripts.

Details on Replace Confirmation Fields:

Found String List: The list box at the top of the confirmation dialog containing the Search Results allows you to double-click an item to display a View Context dialog to see the exact context of the pending replacement. You can also use the right mouse button to display a menu or use the Ctrl+C key to copy the list box contents to the Clipboard. The colors and font of this list box is configurable under General Options.

Replace This button: This occurrence of the found string will be replaced.

Replace Rest In File button: All occurrences of the found string in the file currently being processed will be replaced.

Replace Rest In Directory button: All occurrences of the found string in the files in the current file's directory will be replaced.

Replace All Remaining button: All occurrences of the found string in the file currently processed and the files processed after that will be replaced. No more prompts will be displayed until the end of the operation.

Skip This button: This one occurrence of the found string will not be replaced.

Skip Rest of File button: All remaining occurrences of the found string in the file currently processed, as well as the immediate pending replacement, will be skipped.

Skip Rest In Directory button: All occurrences of the found string in the files in the current file's directory processed, as well as the immediate pending replacement, will be skipped.

Cancel Remaining button: All occurrences of the found string in the file currently processed and the files processed after that will not be replaced.


Abort Script
Save Changes Confirmation?

Click on the Yes button to save the modifications. You will be prompted before overwriting any existing files. Click on the No button to abandon the modifications.


Find Menu Feature
Find Menu (Win95/NT Version)

The Windows 95/NT version of Search and Replace is listed as a program in the Find section of the Win95/NT Start Menu. The menu item will launch a Search & Replace session using the last settings for the program.

Find Menu Example


Search and Replace Shareware Version
Search and Replace Shareware

Thank you for trying the shareware version of Search and Replace. The shareware license is for a 21 day evaluation period from when you first install the program.

The only functional limitation in the shareware version is that you are limited to replacements in only one file per each session. Otherwise, the software is fully operational.

Regarding customer support for the shareware version - If you have a question that is not answered in the documentation, please see the Search and Replace FAQ on our Web site (http://www.funduc.com). If you need further assistance, you may contact us by E-MAIL at support@funduc.com and we will do our best to answer your questions. However, please be aware that ongoing support necessitates that you register Search and Replace.

Please see Purchase & Order Information for how to obtain a registered version of Search and Replace.


Licensing Information
License Information

Search and Replace for Windows
 Copyright (c) 1995-1998 by Funduc Software Inc.
 All rights reserved.

See Ordering Information for more information on how to purchase Search and Replace.

License Agreement and Warranty Disclaimer

You should carefully read the following terms and conditions before using this software. Use of this software indicates your acceptance of these terms and conditions. If you do not agree with them, do not use the software.

Shareware Version

You are hereby licensed to: use the Shareware Version of the software for a 21 day evaluation period; make as many copies of the Shareware version of this software and documentation as you wish; give exact copies of the original Shareware version to anyone; and distribute the Shareware version of the software and documentation in its unmodified form via electronic means. There is no charge for any of the above.

You are specifically prohibited from charging, or requesting donations, for any such copies, however made; and from distributing the software and/or documentation with other products (commercial or otherwise) without prior written permission.

Unregistered use of Search and Replace after the 21-day evaluation period is in violation of federal copyright laws.

Evaluation and Registration

This is not free software. This license allows you to use this software for evaluation purposes without charge for a period of 21 days. If you use this software after the 21 day evaluation period a registration fee is due (see Ordering Information).

Customer support can be obtained by visiting our homepage at http://www.funduc.com or by E-MAIL (support@funduc.com).

One registered copy of Search and Replace may be dedicated to a single person who uses the software on one or more computers or to a single workstation used by multiple people.

You may access the registered version of Search and Replace through a network, provided that you have obtained individual licenses for the software covering all workstations that will access the software through the network.

Governing Law

This agreement shall be governed by the laws of the State of Michigan.

Disclaimer of Warranty

This software and the accompanying files are sold "as is" and without warranties as to performance of merchantability or any other warranties whether expressed or implied. In particular, there is no warranty for the string Replacing feature.

Good data processing procedure dictates that any program be thoroughly tested with non-critical data before relying on it. The user must assume the entire risk of using the program. Any liability of the seller will be limited exclusively to product replacement or refund of purchase price.


Customer Support
Customer Support Information

If you have a question that is not answered in the documentation, a FAQ (Frequently Asked Questions) document is available on our Web site at: http://www.funduc.com. If you need further assistance, contact us directly by E-MAIL at support@funduc.com. Please give as much detail as possible about the operation you want to perform (example lines before and after the replace operation, search and replace strings used, etc.).

Registered users are eligible for support and quarterly updates for a period of six months.

Shareware Users: We will do our best to answer your questions, however, please be aware that ongoing support necessitates that you register Search and Replace.

To report a bug, E-MAIL: bugs@funduc.com.

We welcome suggestions for improving Search and Replace. If you have a suggestion, please check the documentation and the READ.ME file to make sure it is not already implemented or planned. If not, drop us a note at support@funduc.com.

For ordering information, please see the section Ordering Information.

Thank you for using Funduc Software products!


Examples Index

The following are some of the examples available:

Complex File Masks

Regular Expressions

Advanced Script Evaluator


Acknowledgments

The portion of Search and Replace that searches through Zip files is based on the work of the Info-Zip group and used with their permission. Thanks to the entire Info-Zip group, in particular to Jean-loup Gailly, Greg Roelofs, and Mark Adler. If you are interested, you can obtain the Info-Zip code from many sources, including: CompuServe (ibmpro forum); BIX: (ibm.pc listings); Internet (ftp.uu.net:/pub/zip). If you cannot obtain this file from other sources you can send a self-addressed-stamped envelope with a disk to the address in the "About" dialog box.

Thanks to Ernie Allen (eallen@mediaone.net) graphics design for Funduc Software, beta testing, advice, and initial ground work on our web site (http://www.funduc.com).

Thanks to our tireless translators for their work on preparing the language interfaces and documentation for Search and Replace and our other products. Write them if you are in need of localization services. Our group includes:

Translator	Version
Holger Sehlke (Holger.Sehlke@kiel.netsurf.de)	German interface & documentation
Hassimiou Barry (std10330@dial.techfak.uni-kiel.de)	French interface & documentation
Koichi Yoshimura (write at info@funduc.com)	Japanese interface & documentation
Sergio De Zordo (sergio.dezordo@cegroup.it)	Italian interface & documentation.

Thanks to Ken Webster (kenwebster@csi.com) for beta testing, suggestions, development of the help file, and webmastering our site (http://www.funduc.com).

Finally, thanks to you, our customers, for your suggestions & support!


Language Support
International Language Support

Please visit our web site at http://www.funduc.com for details & downloads about language modules for Search and Replace. German, French, and Japanese versions are currently available. Italian and Portuguese versions are under development and may already be available by the time you read this.

Please contact Mike Funduc by EMail at mike@funduc.com if you would like to create a version for your native language. DLLs and documentation for other languages will be posted on our web site, http://www.funduc.com, as they become available.


NO HELP1
No Help Available

No help is available for this area of the window.


NO HELP2
No Help Available

No help is available for this message box.


About ZIP Functions
ZIP Files

ZIP files, or ZIP archives, are files that contain one or more other files that are stored inside of the ZIP. The files inside of ZIPs are typically stored in a compressed form that reduces the size of the original file(s) to save on amount of disk space needed. Search and Replace is able to search through ZIP files created using the PKZIP standard.

To enable ZIP searches, check the "Search ZIP files" field on the Search and Replace Main Window. When enabled, any ZIP files created with PKZIP or compatible utilities that are present in the search path(s) will be examined and any files meeting file mask(s), path, and filter options criteria will be temporarily extracted to the extract path specified under Search Options and searched. You do not need to specify *.zip in the file mask field to search ZIPs -- simply check this box instead. Any file masks and filter options specified will be applied to files found inside of ZIPs.

Searching ZIPs requires extra processing and may slow down your search so you may wish to turn if off when you do not need it.

ZIP operations are only available for Searches. If you wish to do replacements on files inside of ZIPs, you will need to extract the files using a ZIP utility such as our Directory Toolkit for Windows95/NT. Also note that while you may view the context of searches of files in ZIPs, any edits you make using the context viewer will not be saved to the original ZIP.

Finally, note that Search and Replace will not search "password" encrypted files in ZIPs, e.g., files stored with the PKZIP -s switch.


Search and Replace About Box

This window contains system and copyright information. The underlined link to our web site will launch the default www browser for your computer and take you to http://www.funduc.com. The underlined EMail link will launch the default Internet EMail program for your computer. Click the Ordering Info button for Ordering Information or the License Info button for License Information.

For customer support, please contact us via Email at support@funduc.com.


About Search and Replace
      Search and Replace for Windows

Search and Replace for Windows 3.1, 95, NT
Version 2.90
Copyright © 1995-1998 Funduc Software, Inc.
All Rights Reserved
http://www.funduc.com

See Ordering Information for details on how to purchase Search and Replace for Windows or write us at info@funduc.com. See License Information for details about licensing. For customer support, EMail us at support@funduc.com or visit our web site at www.funduc.com for FAQs & program updates. Also check our web site for product information, trialware & freeware downloads of our other award winning software products.