Solved

Find and replace a string in Windows 2000

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Windows 8 in a W2K Domain 7 582
How to change folder redirection to a new server 5 738
Outlook 2013 Certicate error 1 290
Windows 7 7 262
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…
Learn how the use of a bunch of disparate tools requiring a lot of manual attention led to a series of unfortunate backup events for one company.
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…
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

813 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

14 Experts available now in Live!

Get 1:1 Help Now