Solved

Find and replace a string in Windows 2000

Posted on 2003-11-03
4
128 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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

What does UTC stand for?  “Coordinated Universal Time” – Think of this as the true time on Planet Earth that never changes with the exception of minor leap seconds here and there to account for the changes in the planet's rotation.   What does th…
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…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

910 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now