Solved

Find and replace a string in Windows 2000

Posted on 2003-11-03
4
130 Views
Last Modified: 2010-04-14
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
Comment
Question by:nivo_Z
4 Comments
 
LVL 32

Accepted Solution

by:
jhance earned 50 total points
ID: 9671156
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
Starting your own business is always a daunting process, and for most people it is brand new experience. Avoid the common pitfalls by following these tips to start on the road to success.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question