home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
-
- SSWITCH
- Free DOS utility: text file search and replace
- Version 1.00 - July 14, 1993
- (c) 1993
- by
- David Daniel Anderson
- Reign Ware
-
-
-
-
-
- SSWITCH searches for and replaces strings in text files. A string is any
- sequence of up to 255 characters, and may contain spaces. Case is ALWAYS
- sensitive, that is, David is not the same as david.
-
- Usage: SSWITCH source_file new_destination_file
- You must use the DOS command SET as follows:
- SET switch_s=search_text
- SET switch_r=replace_text
-
-
- SSWITCH takes exactly two parameters on the command line, both of which are
- both MANDATORY: the name of the file to search followed by a NEW file name,
- which will be the altered file. (Wildcards are not allowed.)
-
- SSWITCH also requires that two environmental variables be set:
- switch_s (the text you are searching for) and
- switch_r (the text you are replacing it with).
-
- EXAMPLE: to replace the phrase "am disgusted with" with the word "enjoy"
- (both without the quotes), in the file gripe.ltr, with the new file being
- praise.ltr, the following three commands must be entered exactly as shown:
-
- set switch_s=am disgusted with
- set switch_r=enjoy
- sswitch gripe.ltr praise.ltr
-
- That's it!
-
- Limitations: no string, including lines in the file, may ever exceed 255
- characters. The program will work, but your lines will be truncated.
- The program will not span lines when searching for text to replace, so
- if searching this file for "255 characters" it will find on this line only.
-
-