Computing.Net > Forums > Disk Operating System > How to find and replace a string

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

How to find and replace a string

Reply to Message Icon

Name: Rao
Date: August 15, 2001 at 14:23:52 Pacific
Comment:

I need to find and replace a string using a bat file. Can anybody give me the code for this?
Thanks in advance



Sponsored Link
Ads by Google

Response Number 1
Name: Grant
Date: August 15, 2001 at 19:16:32 Pacific
Reply:

Rao, I don't know of a way directly in DOS, v6.x. I can tell you a few tools that can do this. One is a DOS port of sed, email me. Streaming Editor. Such a command line would be sed -s 's/strint to find/string to replace it with/' filename. I have heard that you can script edlin to do this for you. I would trust the former more than the later though. This should give you some place to look. If you want / need more help email me, drscriptt@yahoo.com, and I'll see what I can do.


0

Response Number 2
Name: Michael
Date: August 15, 2001 at 19:36:41 Pacific
Reply:

Use GSAR.exe (Global Search and Replace). Download it from: ftp://gatekeeper.dec.com/pub/micro/pc/simtelnet/msdos/txtutl/gsar110.zip

Good Luck!
-Michael


0

Response Number 3
Name: Anu
Date: November 30, 2001 at 11:03:36 Pacific
Reply:

I would like a batch file to search and replace a string in the batch file.
Thanks!!


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: How to find and replace a string

Find and Replace in Batch files www.computing.net/answers/dos/find-and-replace-in-batch-files/15677.html

How to find & delete files in DOS www.computing.net/answers/dos/how-to-find-amp-delete-files-in-dos/5401.html

How to delete and partiton a 2 gig hdd? www.computing.net/answers/dos/how-to-delete-and-partiton-a-2-gig-hdd/4931.html