Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.
set input=%input:search=replace%
C:\>set oldstring=xxxx xxxx 0, 52, xxx xxxC:\>set newstring=%oldstring:0, 52=0, 21%C:\>echo %oldstring%xxxx xxxx 0, 52, xxx xxxC:\>echo %newstring%xxxx xxxx 0, 21, xxx xxx
am I right?
could you decribe few more - please?I'm always undesrtood that set command sets environment variables and ... that mean changes in area that can cause conflict with other programs if I'm not careful with these "environment" parameters ... so I don't understand how this way is possible to make changes to files that really are only used for the files that I want.Ok - it is possible to define PATH but this define the path for runtime environment ... it feels few scary way to handle these changes - am I again wrong?
I need to write a batch file that will look through all file lines and replace a special substring with another string.
I noticed that this topic is not answered ... in correct way, so ... I describe few more:I have text-file "test.txt" that I need to modify it - to find the strings and replace them the another - like:Before:xxxx xxxx 0, 52, xxx xxxxxx xxx 0, 55, xxx xxx xxx xx 0, 52, xxx xx xxxAfter:xxxx xxxx 0, 21, xxx xxxxxx xxx 0, 55, xxx xxx xxx xx 0, 21, xxx xx xxx
sed.exe s/52/21/g teststr.txt