Command Prompt for Windows

Command STRREP


Replace all occurrences of a string within the specified text with another string . The resulting string is stored in an environment variable called STRREP.


STRREP "old" "new" [text]
oldA string that specifies the string to find.
newA string that specifies the replacement string.
textA sequence of characters.


When the string (ie. parameter old) does not occur within the text then the environment variable STRREP will contain a copy of parameter text.

Also see command STRFIND, STRRFIND and Batch Files.