JSI Tip 6460. Freeware command-line text editor.


Brian Johnson sent me TE.Zip. When you extract TE.EXE, open a CMD prompt and type TE /?, you receive:

Usage: TE c filename.ext "text1" "text2"
  filename.ext is the text file to be operated on (max 10000 lines)
  text1 is the search text and text2 is the operand
  c is the command to execute and is one of the following:
   a = \[A\]dd new line consisting of text2 after line containing text1
   b or e = add text2 to the \[B\]eginning or \[E\]nd of the line containing text1
   r = \[R\]eplace text1 with text2
   d = \[D\]elete line containing text1 (text2 is optional and ignored)

NOTES: If the command is UPPER CASE the text search will be case-sensitive.
Neither text1 nor text2 can contain quotes ("), because the quote is used as a
string delimiter, but can contain any other characters including space.

Example:  TE b c:\test.txt "" "rem "
          will search the file c:\test.txt for the occurrence of
 and prefix any lines that contain it with "rem "

Optional usage of TE is
TE x c filename.ext "text1" "text2"
Note the addition of x, which is a DELIMITER.  This overrides the default
delimiter (").  It cannot be a letter or a number and is OPTIONAL.
NOTE: The TE x c filename.ext "text1" "text2" example should read TE x c filename.ext xtext1x xtext2x. An example using quote marks ( ") in text1 and/or text2 might be:

TE # d c:\ro.reg #"RegisteredOwner"#
TE # a c:\ro.reg #"RegisteredOrganization"# #"RegisteredOwner"="Jerold Schulman"#

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.