UrbaneRove
Programmer
Hello there.
I need some help in writing a Batch file to write an update to a text file.
The text file has a modem connection string that needs to be updated on machines aound the network. The idea is to write a simple batch program that will open the file (modem.cfg) which is a standard text file and then find the current connection string (mdmconnect: AS454...) and replace it with the current string (mdmconnect: AS558...). Also at that time to make a note in the same file of when and how it was updated.
What I need to know:
1) Is how to find the line within the text file
2) How to output a string from a batch file to another text file.
3) How to replace a line or characters in that text file
4) How to add a line to that text file. The added line would be in the middle of the page of text.
Any help is greatly appreciated. An example or on-line documentation would be perfered. I've looked but I can't seem to find what I need.
Thanks for any time and help.
Urbane Rove
I need some help in writing a Batch file to write an update to a text file.
The text file has a modem connection string that needs to be updated on machines aound the network. The idea is to write a simple batch program that will open the file (modem.cfg) which is a standard text file and then find the current connection string (mdmconnect: AS454...) and replace it with the current string (mdmconnect: AS558...). Also at that time to make a note in the same file of when and how it was updated.
What I need to know:
1) Is how to find the line within the text file
2) How to output a string from a batch file to another text file.
3) How to replace a line or characters in that text file
4) How to add a line to that text file. The added line would be in the middle of the page of text.
Any help is greatly appreciated. An example or on-line documentation would be perfered. I've looked but I can't seem to find what I need.
Thanks for any time and help.
Urbane Rove