home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- SEARCH AND REPLACE UTILITY
-
- Version 1.1
-
-
-
- For MS-DOS Based Personal Computers
-
- ---------
-
-
-
- User's Manual
-
-
- (c) 1992 O'Brien Consulting Services
- February 1992
-
-
- Table of Contents
-
-
-
-
-
- Introduction................................................1
-
- Installation................................................3
-
- Running The Program.........................................4
-
-
-
- APPENDICES:
- -----------
-
-
- Sample Audit File..........................................A
-
- Warranty/Disclaimer/Terms & Conditions.....................B
-
- Registration...............................................C
-
-
- PAGE 1
-
-
- -- INTRODUCTION --
-
-
- This SEARCH AND REPLACE product allows a user to do massive search
- and/or replace operations. Nearly all editors provide this for one
- file at a time, but this product can do this for all files in an
- entire path and/or drive. While this product is targeted at
- system developers and programmers, the casual user may find it of
- use also.
-
- The program, SREP.EXE, is easy to use. Field level help is
- available at any time by pressing the F1 key. The ESCAPE key
- can be used at any point, even while the search and/or replace
- is running. All in all, a very user friendly program.
-
- The program does its best at identifying text files. If a
- binary file, such as an executable file like COM or EXE is
- encountered, a message is displayed and you must press enter
- to continue. It is possible for the program to think a binary
- file is actually a text file. This is generally not a problem
- since you would usually run the program against text files
- like BAT, C, COB, BAS or ASM rather than EXE or COM files.
-
- The program runs in one of 3 modes; SEARCH, REPLACE or
- SIMULATE. Search mode simply finds all files that contain
- the search string you specify. Replace mode will actually
- change the files where the search string is found. Simulate
- will run exactly like Replace except that the files will not
- be updated.
-
- Regardless of the run mode, an audit file may be created and
- can contain either a summary of the files that contain the
- search string or can contain detail on each line containing the
- search string before and after the replace.
-
- Replace mode actually changes files and will run longer than
- the Search or Simulate mode. This is because a temporary file
- is created containing the changed records and those that were
- not changed. If any records in the file were changed, the
- original file is overwritten with the temporary file. If the
- escape key is pressed during the overwrite, the overwrite WILL
- FINISH before responding to the escape key. You can safely
- press the escape key any time and not worry about partially
- updated files.
-
-
- PAGE 2
-
-
- -- INTRODUCTION -- (continued)
-
-
- The replace mode will run much faster if you run the program from
- a ram or virtual disk. This is because the temporary file created
- is created in the current directory.
-
- It is STRONGLY suggested that you do the following BEFORE running
- the program in replace mode:
-
- 1. Run the program in simulate mode and then check the audit
- file for correctness.
-
- 2. Back up or make a copy of all the files that will be
- changed prior to running the program in replace mode.
-
-
- PAGE 3
-
-
- -- INSTALLATION --
-
-
- Copy the SREP.EXE and SREP.HLP (help file) into some directory
- that is located in your PATH statement. Most users have a
- UTILITY directory, which would make an excellent choice.
-
- The help file (SREP.HLP) has to be in the same directory as
- SREP.EXE. SREP.EXE looks for the help file in the directory
- where SREP.EXE was loaded from. If you run the program from
- D:\TC20\PROGRAMS for example and SREP.EXE resides in the
- C:\UTIL directory, SREP.EXE will look for SREP.HLP in the
- C:\UTIL directory.
-
- If you put the files into its own directory, make sure you
- add that directory to your PATH statement in your
- AUTOEXEC.BAT file.
-
-
- PAGE 4
-
-
- -- RUNNING THE PROGRAM --
-
-
- Type SREP at the command prompt to start the program. From
- there you following fields must be supplied:
-
- PATH FOR FILES
- Enter the full path name of where the files to be searched
- and/or replaced are located. Use C:\ for root directories
- or C:\COBOL\PROGRAMS for sub directories for example.
- If you want to search the current directory, leave this
- field blank.
-
- INCLUDE SUB-DIRS
- Enter a 'Y' if sub-directories should be searched also,
- enter a 'N' if not.
-
- FILE SPECS
- Up to 3 file specifications can be supplied. You can
- use all the standard DOS wildcards. Examples of valid
- file specifications are *.C, CH??.B??, RD*.BAT, SREP.*
- and so on.
-
- SEARCH STRING
- Enter the string you wish to search for. The string can
- contain virtually any text.
-
- SEARCH STRING LENGTH
- Enter the length of the string you want to search for.
- If this field is zero you can press CTRL-ENTER and the
- field length will be calculated for you. You only need
- to change this if the field to be searched contains
- trailing spaces.
-
- ACTION
- SEARCH - This will only find the files that contain
- the search string. The audit file will
- contain a list of files that the string
- was found in as well as each record that
- contains the search string.
- REPLACE - This will find and replace the search
- string with the new string. The audit file
- will contain a list of the files that the
- string was found in as well as each record
- that contains the search string and an
- image of the changed record.
- SIMULATE - This functions just like REPLACE except
- that no updates are actually performed.
-
-
- PAGE 5
-
-
- -- RUNNING THE PROGRAM -- (continued)
-
-
- AUDIT TRAIL FILE NAME
- Enter the path and file name of where the audit file
- is to be created. If no audit file is desired, set
- this field to blanks.
-
- IN DETAIL OR SUMMARY
- The audit file will always contain the names of the files
- that the search string was found in. If this field is set
- to DETAIL, then each record the search string was found in
- will be displayed as well as the changed string if a new
- string was entered. If this field is set to SUMMARY, then
- only the file name will be audited.
-
- NEW STRING
- Enter the string you wish the search string to be changed
- to. The string can contain virtually any text. If this
- field is left blank and its length is zero, the search field
- will essentially be eliminated.
- This field is not required if you are only searching.
-
- NEW STRING LENGTH
- Enter the length of the new string. If this field is
- zero you can press CTRL-ENTER and the field length will
- be calculated for you. You only need to change this if
- the new field contains trailing spaces.
-
- IS CASE SIGNIFICANT
- If the search string has to be found in the exact
- upper/lower case as it was supplied enter a 'Y'. If
- the search string can be found regardless of case
- enter a 'N'.
-
-
- APPENDIX A
-
-
- -- SAMPLE AUDIT FILE --
-
-
- --------------------------------------------------------------------------------
-
- O'Brien Consulting Services
- Search and Replace Utility v1.1 (C) 1992
-
- --------------------------------------------------------------------------------
-
- Input parameters:
- Path For Files: D:
- Include Sub-directories: Y
- File Specs: *.C *.H
- Search String: <HELP_>
- Search String Length: 5
- New String: <HLP_INDEX_>
- New String Length: 10
- Action: Simulate - Log shows updates, but none done
- Audit Trail File Name: SREP.LOG, In Detail
- Is CaSe SiGnIfIcAnT?: N
-
-
- D:\MAJOR\ORDENTRY\EDIT.C
- [363 ] From: whelppcat(HELP_EDIT);
- To: whelppcat(HLP_INDEX_EDIT);
-
- D:\MAJOR\ORDENTRY\UPLOAD.C
- [147 ] From: whelppcat(HELP_UPLOAD_FILE);
- To: whelppcat(HELP_INDEX_UPLOAD_FILE);
-
- D:\MAJOR\ORDENTRY\ALL.H
- [3 ] From: #define HELP_MAIN 1
- To: #define HELP_INDEX_MAIN 1
- [4 ] From: #define HELP_UPLOAD_FILE 2
- To: #define HELP_INDEX_UPLOAD_FILE 2
- [5 ] From: #define HELP_COMMANDS 3
- To: #define HELP_INDEX_COMMANDS 3
- [6 ] From: #define HELP_ADD_ORDER 4
- To: #define HELP_INDEX_ADD_ORDER 4
- [7 ] From: #define HELP_ADD_ORDER_NAME 5
- To: #define HELP_INDEX_ADD_ORDER_NAME 5
- [8 ] From: #define HELP_ADD_ORDER_DESC 6
- To: #define HELP_INDEX_ADD_ORDER_DESC 6
- [9 ] From: #define HELP_COPY_ORDER 7
- To: #define HELP_INDEX_COPY_ORDER 7
- [10 ] From: #define HELP_COPY_ORDER_NAME 8
- To: #define HELP_INDEX_COPY_ORDER_NAME 8
-
-
- APPENDIX B
-
-
- -- WARRANTY/DISCLAIMER/TERMS & CONDITIONS --
-
-
- O'Brien Consulting Services warrants to the original purchaser of
- this computer software product that the recording media on which
- the programs are recorded will be free from defects in material
- and workmanship for ninety (90) days from the date of purchase.
- Defective media returned by the purchaser within ninety (90) days
- will be replaced without charge provided the returned media have
- not been subjected to misuse, damage, or excessive wear.
-
- O'Brien Consulting Services does NOT warrant that the programs
- will meet the purchaser's specific requirements. ANY STATEMENTS
- MADE REGARDING THE UTILITY OF THE PROGRAMS ARE NOT TO BE
- CONSTRUED AS EXPRESS OR IMPLIED WARRANTIES.
-
- THIS WARRANTY IS IN LIEU OF ALL OTHER WARRANTIES, WHETHER WRITTEN
- OR ORAL, EXPRESSED OR IMPLIED. ANY IMPLIED WARRANTIES, INCLUDING
- IMPLIED WARRANTIES OF MECHANTABILITY AND FITNESS FOR A SPECIFIC
- PURPOSE ARE EXCLUDED.
-
- IN NO EVENT WILL O'BRIEN CONSULTING SERVICES BE LIABLE FOR
- INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND IN CONNECTION
- WITH THE SOFTWARE PRODUCT.
-
-
- Registered copies of SEARCH AND REPLACE UTILITY may be purchased
- by completing the attached registration form and send it with a
- check for $25.00 per copy (quantity discounts, network pricing,
- and site licenses also available) to O'Brien Consulting Services
- at the address given. Purchase orders will be accepted subject
- at all times to approval of O'Brien Consulting Services. Terms of
- payment for orders received via purchase order are due net 30
- days.
-
- O'Brien Consulting Services shall not be liable for delays in
- performance caused by riots, strikes, floods, accidents, or any
- other contingency beyond its control.
-
- Accepted orders are subject to cancellation charges to the extent
- O'Brien Consulting Services shall be reimbursed for the cost of
- reasonable expense incurred prior to the cancellation as a result
- of order acceptance.
-
-
- APPENDIX B
-
-
- -- WARRANTY/DISCLAIMER/TERMS & CONDITIONS -- (continued)
-
-
- SEARCH AND REPLACE UTILITY distribution package, consisting of
- the program and documentation files are copyright (c) 1992 by
- O'Brien Consulting Services. The author reserves the exclusive
- right to distribute this product, or any part thereof, for
- profit.
-
- Under NO CIRCUMSTANCES may modified versions or disassembled
- versions be distributed, either for profit or in the public
- domain.
-
-
- User's groups, clubs, libraries and clearing houses are
- authorized to distribute the FREE version of SEARCH AND REPLACE
- UTILITY pursuant to the following conditions:
-
- 1. No charge is made for the software or documentation. A
- nominal distribution fee may be charged, provided that it
- is no more that $7 total.
-
- 2. The program and documentation are distributed together and
- are not modified in ANY way.
-
-
- APPENDIX C
-
-
- -- REGISTRATION --
-
-
- Once you become a registered user of SEARCH AND REPLACE UTILITY
- you will receive the following benefits:
-
- o Support by phone, mail, or through our bulletin board
- system. Support will only be provided to registered
- users.
-
- o Notice of significant upgrades and bug fixes. You will
- be notified by mail for any such updates. There will be
- no charge for updates as long as you send us a diskette
- and return postage. You can also receive a free update
- through our bulletin board.
-
-
- Each copy of SEARCH AND REPLACE UTILITY is registered for use on
- one computer only and a registered copy is required for each
- additional computer. The price breakdown is given below:
-
-
- Copies Price Per Copy
- -------- ----------------
- 1-50 $25.00
- 51-100 $21.00
- 101-500 $18.00
- 500+ $16.00
-
-
- The price for networks $100.00 for each file server and $5.00
- for each computer (node) on the network.
-
-
- The registered version of SEARCH AND REPLACE UTILITY can be used
- in commercial, educational, and governmental institutions.
-
- The free version of SEARCH AND REPLACE UTILITY is expressly
- prohibited for use in commercial, educational, and governmental
- institutions except for the purpose of evaluation.
-
-
- APPENDIX C
-
-
- -- REGISTRATION -- (continied)
-
-
- Please send me a copy of the current full version of SEARCH AND
- REPLACE UTILITY and add me to the list of registered users, to be
- eligible for support and update notices.
-
- Computer Model: _____________________________________________
-
- -----Quantity by diskette type-----
-
- SEARCH AND REPLACE UTILITY _______ 5.25 in. ________ 3.5 in.
-
-
- May we send you high-density diskettes? _____(yes) _____(no)
-
- Company Name: _____________________________________________
-
- Your Name: _____________________________________________
-
- Title: _____________________________________________
-
- Address: _____________________________________________
-
- City, State, Zip: _________________________________________
-
- Phone: _____________________________________________
-
-
- Any initial comments about SEARCH AND REPLACE UTILITY?
- ___________________________________________________________
- ___________________________________________________________
- ___________________________________________________________
-
-
- Where did you hear about SEARCH AND REPLACE UTILITY?
- ___________________________________________________________
- ___________________________________________________________
- ___________________________________________________________
-
-
- May we use your comments and/or name in future literature for
- O'Brien Consulting Services products? _____(yes) _____(no)
-
- Send registration form and check or money order to:
-
- O'Brien Consulting Services
- P.O. Box 742
- Mequon, Wi. 53092
- (414) 241-9504 - Voice
- (414) 241-9125 - Data (9600,N,8,1)
-