home *** CD-ROM | disk | FTP | other *** search
/ Shareware Supreme Volume 6 #1 / swsii.zip / swsii / 126 / SSWITCH.ZIP / SSWITCH.DOC < prev    next >
Text File  |  1993-07-14  |  2KB  |  51 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.                                     SSWITCH
  7.                  Free DOS utility: text file search and replace
  8.                           Version 1.00 - July 14, 1993
  9.                                     (c) 1993
  10.                                        by
  11.                              David Daniel Anderson
  12.                                    Reign Ware
  13.  
  14.  
  15.  
  16.  
  17.  
  18. SSWITCH searches for and replaces strings in text files.  A string is any
  19. sequence of up to 255 characters, and may contain spaces.  Case is ALWAYS
  20. sensitive, that is, David is not the same as david.
  21.  
  22. Usage:  SSWITCH source_file new_destination_file
  23.     You must use the DOS command SET as follows:
  24.         SET switch_s=search_text
  25.         SET switch_r=replace_text
  26.  
  27.  
  28. SSWITCH takes exactly two parameters on the command line, both of which are
  29. both MANDATORY:  the name of the file to search followed by a NEW file name,
  30. which will be the altered file.  (Wildcards are not allowed.)
  31.  
  32. SSWITCH also requires that two environmental variables be set:
  33.   switch_s (the text you are searching for) and
  34.   switch_r (the text you are replacing it with).
  35.  
  36. EXAMPLE: to replace the phrase "am disgusted with" with the word "enjoy"
  37. (both without the quotes), in the file gripe.ltr, with the new file being
  38. praise.ltr, the following three commands must be entered exactly as shown:
  39.  
  40. set switch_s=am disgusted with
  41. set switch_r=enjoy
  42. sswitch gripe.ltr praise.ltr
  43.  
  44. That's it!
  45.  
  46. Limitations: no string, including lines in the file, may ever exceed 255
  47. characters.  The program will work, but your lines will be truncated.
  48. The program will not span lines when searching for text to replace, so
  49. if searching this file for "255 characters" it will find on this line only.
  50.  
  51.