Create a bat file to overwrite a few lines in a text file

May 15, 2012 at 12:30:09
Specs: Windows 98
Hi,

Is it possible to create a bat file with user input. The new input will replace lines in a existing text file. For example below are what is in the text file. I want to keep everything the same except what is in between < >. And the user get to type 4 lines which replace these.

[Timeline]
Line_0=< I want to replace this with what the user input 1>
Line_1=< I want to replace this with what the user input 2>
Line_2=< I want to replace this with what the user input 3>
Line_3=< I want to replace this with what the user input 3>

Thanks for your ideas.
Derek


See More: Create a bat file to overwrite a few lines in a text file

Report •

#1
May 15, 2012 at 13:53:55
the set /p command will prompt for user input.
in order to add lines to a file you will have to rewrite the file

so depending on where you want to change the lines you will have to configure the bat file differently

mike


Report •
Related Solutions


Ask Question