• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 136
  • Last Modified:

Find and replace a string in Windows 2000

HI,

How can I find and replace a string in Windows 2000 using a simple batch file.
I need the batch to open a text file, find a string and replace it.

Thanks,
0
nivo_Z
Asked:
nivo_Z
1 Solution
 
jhanceCommented:
There is a handy utility called SED from the unix world that has been ported to WIN32.  See:

http://unxutils.sourceforge.net/

Once you have it, you can do something like:

sed s/text to find/replace with/ myinput.txt >myoutput.txt

Windows does not have a similar tool included by default.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now