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
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
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!!
Summary: Hi, I want to create a file to do the following: 1. Create multiple copies of a folder and rename them in a numerically ascending order. 2. Open a specific file from the folder and change some of the ...
Summary: Hi, My problem is that I tried deleting Norton Anti-Virus from my laptop which runs Windows 3.1. However, now I'm getting the following Application Error message: "PROGMAN caused a General Protection...
Summary: Hello, I need help on repartitioning my 2 gig hdd. It has a file already stored and I don't need them. Just wanted to delete the Non Dos partition but I don't know how to start with. Please h...