Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Click here to start participating now! Also, check out the New User Guide.
Replace text in file
Name: tmccar Date: July 9, 2009 at 09:22:04 Pacific OS: Windows Vista Subcategory: Batch
Comment:
I want to replace some text fields in a file. The file will be similar to : This is %name1% This is %name2% This is %name3%
And I will be writing different files based on the 3 name parameters. I want to be able to pass these 3 names as parameters to the batch file, so that it writes the names to the file. In other words, if I enter "Changeit.bat dog cat horse", I want an output file that reads: This is dog This is cat This is horse
(I have simplified the output file greatly, but if I can get this to work, I can apply it to the big file).
Summary: I have been reading all the posts and tips here about replacing text in files. However, neither of them works for me. I have a regfile containg a lot of "123xyz". I want to replace them within a BAT w...
Summary: I have 2 text file, A.txt and B.txt. Some text (Bold) is veriable, and can be change any time. file A.txt contain: 1. ----------------first line fixed.------. ---------- \\abcd\abcd\abcd\3061_2009-11-...
Summary: Hi Mechanix2Go, Thanks for your reply. I want to replace it in the same file. What I am trying to do is explode an ear bundle and then replace certain value in a file and then bundle it up again. I ch...