home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR8 / GLEDIT24.ZIP / GLEDIT.DOC next >
Text File  |  1993-07-15  |  18KB  |  385 lines

  1.                                     GLEDIT
  2.                               Global File Editor
  3.                                  USER'S GUIDE
  4.  
  5.                   Copyright 1990, 1993 by Gary C. Crider and
  6.                                Parity Solutions
  7.                                
  8.  
  9.  
  10. TABLE OF CONTENTS:
  11.  
  12.         What is GLEDIT? .................................. 1.0
  13.         The GLEDIT command line .......................... 2.0
  14.         Operational Notes and Cautions ................... 3.0
  15.         Locating Data .................................... 4.0
  16.         Modifying Data ................................... 5.0
  17.         Printing or Saving the Output .................... 6.0
  18.         Return Codes ..................................... 7.0
  19.         Installation ..................................... Appendix A
  20.         Disclaimer ....................................... Appendix B
  21.         Support .......................................... Appendix C
  22.         Registration ..................................... Appendix D
  23.  
  24.  
  25. 1.0 What Is GLEDIT?
  26.  
  27.    GLEDIT lets you globally search for, and optionally replace, a string of 
  28. characters in all selected files a directory.  If you are familiar with GREP 
  29. from Borland International, you know the power of being able to search all 
  30. .BAT files in your BATCH directory when you move some applications to a new 
  31. disk volume.  You are able to tell immediately which batch files need to be 
  32. modified.
  33.  
  34.    GLEDIT takes it a step further in letting you also specify the string that
  35. is to replace the search string and does the update of the file for you.  It
  36. prompts you before changing each line that may require modification.
  37.  
  38.  
  39.  
  40. 2.0 The GLEDIT Command Line
  41.  
  42. Format: 
  43.    GLEDIT [path]filespec "searchstring" ["replacestring"] [switches]
  44.  
  45.    The "filespec" is the file name of the file that you want to search or 
  46. edit.  If the "filespec" is a wildcard specification, all matching files in 
  47. "path" will be searched/edited.  If "path" is not specified, the current 
  48. directory is used.  If a mapped network directory is used for the path, the
  49. full directory path should be specified, rather than just the drive letter.
  50. For example, use W:\UTIL\*.* rather than W:*.* if W: is mapped to the UTIL
  51. directory.  Do not use the actual network drive names in the path such as 
  52. APPL:\UTIL\*.*.
  53.  
  54.    The "searchstring" is the string of characters to look for in each 
  55. matching file.  It should be enclosed in quotes if it contains spaces, commas 
  56. or characters other than letters or numbers.
  57.  
  58.    The "replacestring" is the new string to be inserted in place of the
  59. "searchstring".  It does not have to be the same length as the "searchstring".  
  60. The new record length will be adjusted to accommodate the replacement.  It 
  61. should be enclosed in quotes if it contains spaces, <, >, or |. 
  62.  
  63.    Either string may contain quotes by typing \q (lower case) in place of the
  64. desired quote(s).
  65.  
  66.    The replace string may not be the same as a switch, even if enclosed in
  67. quotes.  The switch characters may be embedded within a replace string.
  68.  
  69. Switches:
  70.  
  71.    /I indicates case-insensitive searching where the search argument and the
  72. target record will match if they contain the same letters regardless of
  73. upper or lower case.  /I has no effect on "replacestring".  The "replace-
  74. string" is inserted as entered in the command line.
  75.  
  76.    /D instructs GLEDIT to delete the specified searchstring whenever it is
  77. encountered.  It works just like the normal replace option with the
  78. replacestring set to a null string.  You need not specify a replacestring.
  79. If you do, it will be ignored.
  80.  
  81.    /N directs output to the standard output device (normally the display).
  82. GLEDIT normally writes to the screen with color highlighting of the matched
  83. string.  Output directed to the screen cannot be redirected to another
  84. device.  The standard output can be directed to another device such as
  85. a file or printer.  If you specify /N and do not redirect the output, it
  86. will appear on the screen without color highlighting.
  87.    
  88.    /S is ignored if "replacestring" was specified.  If not specified, the 
  89. scrolling text on the display will pause for a key to be hit between files 
  90. with matches for "searchstring".  If /S is specified, scrolling is continuous.
  91.  
  92.    /Y is used to automatically reply Y to the replace prompts when in
  93. edit (replace) mode.  Please see "Operational Notes and Cautions" before 
  94. using this parameter.
  95.  
  96.    /T (test mode) performs just exactly like /Y except that no changes are 
  97. actually made to any files.  You can test the results before changing it to
  98. /Y.
  99.  
  100.  
  101. 3.0 Operational Notes and Cautions
  102.  
  103.    Please note that GLEDIT is intended for use in ASCII text files that
  104. use the standard CR/LF record delimiters.  If you use it on binary or non-
  105. standard files, the resulting file will probably be unusable.  If you use
  106. GLEDIT on indexed database records and substitute unequal length strings, you
  107. are almost sure to corrupt your database.  GLEDIT does not back up files 
  108. before replacing them, so be careful and be sure of what you are doing.  The
  109. safest approach is to backup the directory, possibly in an archive (.ZIP,
  110. .ARC, etc.) file before editing with GLEDIT.
  111.  
  112.   GLEDIT has two modes of operation, search and edit.  Whenever a replacement
  113. string or /D is specified, edit mode is activated.  If no replacement string 
  114. is provided and /D is not specified, search mode is invoked.  In search mode, 
  115. no file writes whatsoever take place, therefore no data is modified.  When 
  116. edit mode is invoked, a work file is written to the target directory.  As 
  117. each record is read in, it is also written to the work file, modified or not.  
  118. When GLEDIT reaches end of file on the input file, it checks to see if you 
  119. had elected to make any modifications.  If so, it deletes the input file and 
  120. renames the work file to the name of the input file.  The point of relating 
  121. all of this is that you should not specify a replacement string or /D if you 
  122. are just looking for occurrences of a string.  Edit mode has much higher 
  123. overhead.
  124.  
  125.   Please be extremely cautious when using the /Y parameter.  This is for
  126. users who like to live on the edge and believe, "It's my data and I'll
  127. corrupt it if I want to."  A miskeyed command line or not thinking through
  128. what is going to be the result can cause file damage on a vast scale. If
  129. /Y is specified, the only way to stop it is with CTRL-BREAK.  Even this
  130. could cause a file to be damaged.  Specify BREAK=ON in your CONFIG.SYS
  131. file to make sure you can break out if things are going badly.  Use the
  132. /T switch to test the result before changing it to /Y.
  133.  
  134.   It is a good idea to use /N and redirect the output to a file or printer
  135. during execution of /Y or /T.  This gives a log of the results.  See Printing
  136. or Saving the Output.
  137.  
  138.   If at any time you wish to abort a search, press the ESC key.
  139.  
  140.  
  141. 4.0 Locating Data
  142.  
  143.    The primary purpose of GLEDIT is to let you find files that contain certain
  144. strings, generally because the strings need to be modified, but not always.
  145. If you just want to find what files contain a certain string, just enter
  146. the GLEDIT command without a replacement string and do not specify /D.
  147.  
  148.    GLEDIT will begin going through the target directory finding each file that
  149. matches the filespec you provided in the command line.  It will search each
  150. of the matching files for the search string you provided.  When found, the
  151. file name will be displayed along with any records in the file containing the
  152. search string.  If you did not specify /N, the text will be light gray on a
  153. black background with the search string highlighted in light red text.  If you
  154. did not specify /S, the display scrolling will pause at the end of each file 
  155. with matching strings and wait for a key to be pressed before proceeding to 
  156. search the next file.
  157.  
  158.  
  159.  
  160. 5.0 Modifying Data
  161.  
  162.    Edit mode processing involves everything described under Locating Data 
  163. (except /S) plus you are prompted to reply Y or N depending on whether or
  164. not you want matching records updated as each is displayed.  GLEDIT also 
  165. displays the modified line as it will appear if you reply Y.  You can see
  166. the result before you accept it.
  167.  
  168.  
  169.  
  170. 6.0 Printing or Saving the Output
  171.  
  172.    To print the output of a search, or an edit using /Y or /T, specify the /N,
  173. and /S if in search mode, parameters and redirect the output to the printer:
  174.  
  175.    GLEDIT *.TXT "MOM" /N /S >PRN
  176.  
  177. or log to a file:
  178.  
  179.    GLEDIT *.BAT "G:" "H:" /N /T >C:\GLEDIT.LOG
  180.  
  181.    You can use >> instead of > if you want the output appended to a log file
  182. instead of creating a new log each time.
  183.  
  184.    Do not use redirection when using edit mode (without /Y or /T) or without 
  185. the /S in search mode.  The resulting pauses will make it appear that GLEDIT 
  186. is hung, since you will not see the prompts.  If this happens, repeatedly 
  187. pressing N will allow GLEDIT to progress to completion.
  188.  
  189.  
  190.  
  191. 7.0 Return Codes
  192.  
  193.   The following DOS ERRORLEVEL return codes are returned from GLEDIT:    
  194.     
  195.     0   - One or more matches found.  Replaced or not replaced has no bearing.
  196.     1   - No matches found in any files searched.
  197.     2   - No files found matching the search file specification.
  198.     3   - Invalid path specified in serach file specification.
  199.     4   - Directory recursion error.  Please report to Parity Solutions.
  200.           Should never happen.
  201.     255 - User abort.  ESC key pressed.  Does not detect BREAK key.
  202.  
  203.  
  204.  
  205. APPENDIX A
  206.  
  207. Installation
  208.  
  209.     GLEDIT is distributed in a ZIP file called GLEDIT.ZIP.  It contains the
  210. following files:
  211.  
  212.         GLEDIT.EXE         The executable file for GLEDIT.
  213.         GLEDIT.DOC         The documentation file.
  214.         GLEDIT.HST         History of changes to GLEDIT.
  215.         GLEDIT.Vnn         Description of changes to implement version nn,
  216.                            the current version. 
  217.  
  218.     For best results, unzip the file into a directory on your PATH.  If you
  219. don't use a directory in your path, you will have to designate the directory
  220. containing GLEDIT.EXE when executing the program.
  221.  
  222.     If you have a utility directory that is on your PATH, this is an excellent
  223. location for GLEDIT.  An example installation would be:
  224.  
  225.     C:
  226.     CD \UTIL
  227.     COPY [path]GLEDIT.ZIP
  228.     PKUNZIP GLEDIT
  229.     DEL GLEDIT.ZIP
  230.  
  231.     The PKUNZIP program is by PKWARE, Inc. and is available in many CompuServe
  232. forums under the file name of PKZ110.EXE or PK204E.ZIP.  Since you are reading 
  233. this doc file, you have obviously already managed to unzip the distribution 
  234. file.  If it is not currently in your path, simply copy all of the files to a 
  235. directory in your path.  Keep the GLEDIT.ZIP file anywhere you like, but give 
  236. plenty of copies, as is, to your friends.  If you register GLEDIT, you are not 
  237. licensed to give your serial number to anybody without first removing the 
  238. serialization from your copy.
  239.  
  240.  
  241.  
  242. APPENDIX B
  243.  
  244.  
  245. Disclaimer
  246.  
  247. BECAUSE OF THE DIVERSE NATURE OF COMPUTER EQUIPMENT AND EXPERTISE OF USERS,
  248. PARITY SOLUTIONS AND GARY C. CRIDER MAKE NO WARRANTY ON THE GLEDIT PROGRAM
  249. WHATSOEVER, EXPRESSED OR IMPLIED.  THE USER ASSUMES ALL RISK OF DAMAGE TO
  250. DATA OR EQUIPMENT RESULTING DIRECTLY OR INDIRECTLY FROM THE USE OR MISUSE OF
  251. THIS PROGRAM PRODUCT.  THE USER MUST BE AWARE THAT USING GLEDIT TO MAKE
  252. ALTERATIONS TO PROGRAMS OR DATA CAN RENDER THAT PROGRAM OR DATA USELESS.
  253.  
  254. USERS ARE ADVISED TO TEST MODIFICATIONS MADE WITH GLEDIT THOROUGHLY ON FILES 
  255. FOR WHICH A BACKUP EXITS.  ANY LIABILITY OF THE AUTHOR OR PARITY SOLUTIONS IS 
  256. LIMITED TO REPLACEMENT OR REFUND OF THE REGISTRATION FEE.
  257.  
  258.  
  259.  
  260.  
  261. APPENDIX C
  262.  
  263.  
  264. Support
  265.  
  266.     I have tried to test the program to the fullest, but I am limited as to
  267. systems and configurations with which to test.  I have been programming for 18
  268. years and the one thing I know for sure is that bug free programs are very few
  269. and far between.  I can only promise to support the program to the best of my
  270. ability and provide fixes as expeditiously as possible.  GLEDIT has been used
  271. at my home and work site extensively for several years and has proven to be a
  272. reliable tool.
  273.  
  274.     Anyone can report problems and suggest changes.  Registered users get top
  275. priority in resolving their problems.  There are three ways you can report
  276. problems.  The preferred method is to contact me through CIS mail (not forum
  277. messages).  My CIS ID is 71760,3413.  You can also write me at:
  278.  
  279.    Gary C. Crider
  280.    Parity Solutions
  281.    1105 Burgess Court
  282.    Arlington, TX 76015
  283.  
  284.     The last method is to phone (817) 467-7818.  Since I am the sole technical
  285. support and the line is also used for my network consulting business, it is
  286. often hard to get through to me.  Please call and leave a message between 7:30
  287. am and 5:30 pm Central time.
  288.  
  289.     No matter which method you use, please give a brief description of your
  290. problem, your registration serial number if you are registered, and your phone
  291. number.  If I need more information, I will contact you as soon as I can.
  292. When I have a solution, I will contact you however you prefer.
  293.  
  294.     I work full time, have a consulting business to run in my spare time and
  295. write programs instead of sleeping.  So please be a little patient with me.
  296.  
  297.     Program updates are available on CompuServe or can be requested from us 
  298. for a $5 shipping and handling charge.  Add $1 for international shipping 
  299. outside the North American continent.  A distribution disk of all Parity 
  300. Solutions products will be sent to you.  Specify disk size and format.
  301.  
  302.  
  303.  
  304. APPENDIX D
  305.  
  306.  
  307. Registration
  308.  
  309.  
  310.     I begin with an apology.  I hate programs that in any way inhibit func-
  311. tionality or performance for the shareware version.  But when it came down to
  312. feeding the family and paying the bills, I had a change of heart and inserted
  313. a pesky notice that pops up at the beginning and gets on your nerves.  I
  314. chose this approach above that of limited functionality.  The program's full
  315. capabilities are available for you to evaluate before you invest your hard-
  316. earned money.
  317.  
  318.     You may use GLEDIT unlicensed for 30 days, after which time you are 
  319. required to be registered.
  320.  
  321.     Registered users will receive a unique serial number and instructions on
  322. how to serialize the program.  Serialization can be re-applied to updated
  323. versions and in no way hinders your use of the program.  You can compress or
  324. decompress the program with no effect (LZEXE or PKLITE).  I use Fabrice
  325. Bellard's LZEXE program on GLEDIT.EXE before distribution.
  326.  
  327.     As a registered user, you will be able to update without re-registration
  328. or additional fees.  You will also be kept on my PRIVATE mailing list to
  329. receive additional information on other Parity Solutions products.  
  330.     
  331.     To register your copy, please send $16 ($45 per file server on LANs) check
  332. or money order (sorry, no credit cards yet) to:
  333.  
  334.    Gary C. Crider
  335.    Parity Solutions
  336.    1105 Burgess Court
  337.    Arlington, TX 76015
  338.  
  339.     Or, you can register online quickly and simply on CompuServe.  Simply
  340. GO SWREG and register ID #754.  Your registration will be added to your 
  341. Compuserve bill.  International exchange was never easier. 
  342.  
  343.     If you send your CIS ID or register via SWREG, your registration will be 
  344. sent to you via CIS mail, along with instructions on how to serialize your 
  345. copy of GLEDIT.  This usually involves one day or less turnaround.
  346.     
  347.     Program diskettes are not normally shipped.  Normal distribution is via 
  348. CompuServe.  If you need a diskette, please see the instructions under Support 
  349. above.  You will receive a serial number and instructions for serializing
  350. your copy of the program.
  351.     
  352.     Each license gives you or your company a single-use permit for GLEDIT. It 
  353. is not restricted to a single machine as long as no two users can be simul-
  354. taneously using the program.  As Borland says, "treat it like a book."  As an 
  355. example, if you register GLEDIT for your home computer, but during the day you 
  356. use a portable or a computer at work,  you may keep GLEDIT on both machines as 
  357. long as no one is at home using it on your home computer.
  358.  
  359.     LAN licenses grant rights to all users of a file server.  If inter-
  360. networking, a license must exist for each file server that contains a copy
  361. of GLEDIT.EXE.  If two or more file servers exist on a single LAN strictly for
  362. mirroring data and fault-tolerance, these will be counted as a single file
  363. server for licensing purposes.  If in doubt, contact me.  We can work out
  364. an agreement.
  365.  
  366.     Site licensing is also available on a negotiated price basis.  I guarantee
  367. it will be an economical alternative to buying licenses for each user.
  368.  
  369.     If you are a registered user of GEDIT from Parity Solutions, you may use
  370. your GEDIT serial number to serialize GLEDIT.
  371.     
  372.     You may freely distribute the original GLEDIT.ZIP file in any way you see
  373. fit other than selling it.  Users' groups and shareware distribution services
  374. may charge a reasonable fee for the medium and duplication costs, not to 
  375. exceed six dollars.  Bulletin boards may not charge additional fees for 
  376. downloading this specific program, other than normal connect-time and/or 
  377. membership charges.
  378.  
  379.     You are NOT licensed to give anyone your serial number unless you first
  380. remove all serialization from your computer.  You may then no longer use that
  381. serial number.  Only Parity Solutions has the authority to issue serial
  382. numbers.
  383.  
  384.     Disassembly and/or modification of GLEDIT.EXE to attempt to bypass serial-
  385.