home *** CD-ROM | disk | FTP | other *** search
-
-
-
- GGGGGGGGGG SSSSSSSSSS RRRRRRRRR
- G G S R R
- G S R R
- G S R R
- G SSSSSSSSSS RRRRRRRRR
- G GGG S R R
- G G S R R
- G G S R R
- GGGGGGGGGG SSSSSSSSSS R R
-
-
-
- Global Search Replace
-
- Version 1.3
-
- The Programmers Scalpel!
-
-
- Copyright 1990 Phil Barnett. All Rights Reserved
-
-
- GSR and all of its' associated files are Shareware.
-
- They are also Copyrighted. Please feel free to give this program to anyone
- who uses a DOS based computer as long as it is distributed in unmodified
- and complete form. It should work on any close clone. I developed it in
- DOS 3.3 . It is compiled in Clipper 5.0. with MS-C6.0 subroutines for speed.
- It requires DOS version 3.0 or later.
-
-
- You may use GSR for 2 weeks at no charge.
-
- Then if you wish to continue using GSR, you must
-
- PAY ME FOR IT or STOP USING IT.
-
-
- Registration fee is $20.00. I prefer to trust you, so no protection is
- involved. This is an absolutely complete version. Even if you don't use it,
- please give it to someone who programs
-
-
- ****************************************
- * Phil Barnett (407) 884-5192 *
- * 1105 Binion *
- * Apopka, Fl 32703 *
- ****************************************
-
-
- When you register this program I will send you the latest version which will
- have the registration notice and pause removed from the beginning of the
- program.
-
-
-
- INSTALLATION INSTRUCTIONS
-
-
- You may place GSR in any directory, however it is easier to use if you
- place it in a directory which is in the path statement of your autoexec.bat.
-
-
- GSR includes three files.
-
- 1 GSR.EXE The Executable Program
- 2 GSRAVOID.DBF A table of special extensions (explained below)
- 3 GSR.DOC This Document
-
- !!!!!!!!!! IMPORTANT !!!!!!!!!!! READ THIS !!!!!!!!!!
-
- YOU SHOULD ALWAYS MAKE A BACKUP OF THE DIRECTORY YOU ARE WORKING IN
- BEFORE YOU BEGIN WITH GSR.
-
- YOU SHOULD ALWAYS MAKE A BACKUP OF THE DIRECTORY YOU ARE WORKING IN
- BEFORE YOU BEGIN WITH GSR.
-
- YOU SHOULD ALWAYS MAKE A BACKUP OF THE DIRECTORY YOU ARE WORKING IN
- BEFORE YOU BEGIN WITH GSR.
-
- Even though every precaution has been taken to insure it's safe use, the
- potential for unrecoverable change exists in any program with this kind of
- power. GSR even keeps the last 99 versions of what you are working on.
-
-
-
- !!!!!!!!!!!!!!!!!!!!!!!!! ALWAYS make a backup first !!!!!!!!!!!!!!!!!!!!!!!!!
-
-
-
-
- Manual for GSR Version 1.3
-
-
- GSR is a Global Search and Replace program. It allows you to select a group
- of files to operate on. You can then specify what text to look for, and what
- text to replace it with. Your search can be either case sensitive or not,
- and you may either view each occurance, to verify the change, or have GSR
- automatically make all replacements for you.
-
- Probable uses are:
-
- Rename an existing variable across many programs.
- Change a copyright notice.
- Change a client name when you are recycling code.
- and many more.....
-
- All options are entered into blanks after you run the program.
-
- When you see the field labeled "File Spec to Include" you should enter the
- type of file you wish to perform global operations on. Typical response might
- be;
-
- *.C
- *.PRG
- *.BAT
- *.BAS
- *.TXT
- XXX*.XXX
- and etc.
-
- The next field you enter is 'String to Search for'. This is where
- you enter the text you are wishing to replace. If you need to replace text
- that is longer than 76 characters, or you wish to include carriage return
- linefeed combinations, you may use an input file instead. Place the filename
- in <> like this: <lookfor.txt> as the only item in the field.
-
- (you can use any filename here, lookfor.txt is only an example)
-
- The next field you enter is 'String to Replace with'. This is the
- text you wish to replace the above field with. You may also use an input file
- here by placing the replacement text in a file and specifying it's name
- in <> like this: <a:\repwith.txt> as the only item in the field.
-
- (you can use any filename here, a:\repwith.txt is only an example)
-
- Your next option is '(M)anual or (A)utomatic'. If you select automatic mode,
- the search and replace operation will complete without further intervention.
- If you are unsure of the consequences of this action at all, you should use
- manual mode instead.
-
- Your last option is to make GSR search for your text regardless of the case.
- If you choose 'Case Sensitive' = 'N', capitalization will have no bearing on
- your search.
-
- pHiL will find PHIL
- xxxxxx will find XXXXXX
- PHIL will find phil
- copyright 1990 will find Copyright 1990
- and etc.
-
-
- After you have entered the five primary fields, you will be presented with
- a summary screen of selections. This will allow you to review your choices
- and abort the process if you were mistaken in any way.
-
- When you confirm the selections you have made, the search will begin.
-
- If you selected manual mode, each occurance of the searched for text will be
- displayed in context as it is found. You will be asked:
-
- Replace this occurrance? (Y/N)
-
- If you select Y, it will be replaced, and the search will continue. If you
- select N, the search will continue with no changes to the file.
-
- When you have reached the end of the file, and you have previously selected to
- replace an occurrance, you will receive one final prompt
-
- Replace Global Changes to this File? (Y/N)
-
- If you select Y, your changes will be written. If you select N, any changes you
- have already selected on this file will be ignored.
-
- In any case, if you choose to make the replacements, your original text will
- be saved with the extension .GSR. Subsequent changes will increment the .GSR
- extension, with up to 99 changes kept on any single file name.
-
- MYTEXT.GSR
- MYTEXT.GS1
- MYTEXT.GS2
- MYTEXT.GS3
- MYTEXT.GS4
- MYTEXT.GS5
- MYTEXT.GS6
- MYTEXT.GS7
- MYTEXT.GS8
- MYTEXT.GS9
- MYTEXT.G10
- MYTEXT.G11
- MYTEXT.G12
- MYTEXT.G13
- MYTEXT.G14
- MYTEXT.G15
-
- up to
-
- MYTEXT.G99
-
- 99 previous versions are kept until you choose to delete them. This is going
- to create a lot of backups, but is necessary due to the tremendous power of
- this program to cross all safety barriers.
-
- This process repeats for every file in the selected group.
-
- During the replacement process you are informed of your location in the group
- of files you are operating on. When you have finished, you are presented with
- statistics informing you how many replacements were made and in how many files.
-
-
-
-
-
- GSRAVOID
-
- Why it's here?
-
- There are many types of files that any length text can be replaced with any
- other length, and never cause a problem.
-
- There are many files, however, that allowing a change like this would cause
- a disaster. For this reason, I included fifteen file extensions inside GSR
- that cannot be written to unless the search text and the replace text are
- identical in length.
-
- GSR looks for the file GSRAVOID.DBF in the current directory, and if it finds
- it, GSR reads in file file extensions in GSRAVOID instead of using it's
- internal list.
-
- This allows you to add to or override my fifteen extensions.
-
- The extensions I avoid internally are as follows.
-
- .COM .BAT .EXE .DBF .DBT .NTX .NDX
- .OVL .LIB .OBJ .MEM .SYS .ZIP .ARC
- .PAK
-
- Changing the length of any of these types of files would spell certain
- disaster. You may add more if you wish by filling in more records in
- GSRAVOID.DBF with any dBASE type program. You do NOT need to put GSRAVOID.DBF
- in a directory for GSR to work. It only exists so you can override my defaults.
-
-
-
- WARNING!
-
- DISCLAIMER:
-
- You are totally responsible for the use of this program. If it causes damage
- of any kind, you are responsible. In no way will I, Phil Barnett, assume any
- expense or provide any compensation for the use or misuse of this program.
-
- YOU SHOULD ALWAYS MAKE A BACKUP OF THE DIRECTORY YOU ARE WORKING IN
- BEFORE YOU BEGIN WITH GSR.
-
- GSR is a tool, nothing more. It can be used in a damaging way as easily as
- a beneficial way. I hope you find it of benefit to you. I wished for a program
- like this for a long time, and after giving up hope of finding it, I finally
- wrote it myself. I use it constantly, and wish I'd had it years ago.
-
- Good Luck, Good Programming, and God Bless You.
-
- My motto: Easier is Better!