Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
tyson27
Starting Member
2 Posts |
Posted - 2009-09-10 : 13:53:17
|
| Hi,I'd like to make a batch file which would simply add one or more lines of text to the beginning a file and I'd like to be able to automatically update the file through running the batch file.For example, lets say the text file contains:Martha Stewart220 Mandarine Honey RoadPrince Edwards Island, Fantasy Land724-ASK-MARTHAand I'd like to add the following line:Status: activefinal output should be:Status: activeMartha Stewart220 Mandarine Honey RoadPrince Island, Fantasy Land724-ASK-MARTHAI have this:echo Status: active >>C:\test.txtThis will add the line at the end. I want it at the top, at the beginning of the text file.Also this test file is generated as a result of running a stored procedure. So the naming convention of this text file is name_currentdateandtime.txtSo in this case how to add the line.Should it be added in a batch file or in the stored procedure itself.Thanks for any help |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|
|
|