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.
adding new line to start of txt
Name: ganster Date: September 17, 2008 at 19:52:08 Pacific OS: windows CPU/Ram: any Product: any
Comment:
hi guys i was wondering if u can add a new line to start of a txt file without removing\deleating any of the other lines in the txt file im trying to do this with batch scripting
example:
blah test blah
script edited file
script added new line blah test blah
plz help guys iv bin trying for days and getting nowhere :(
Operating Costs = the cost of operating a business Profits = revenues over and above the operating costs. Taxes = operating costs mandated by gov. TaxPayer = what you are called by the gov.
0
Response Number 2
Name: toast (by NoIdea) Date: September 18, 2008 at 00:38:38 Pacific
Reply:
Are you populating this text file by importing information from another text file? If so echo. >> whatever.txt. eg COPY whatever.txt+another.txt echo. >> whatever.txt
If it is more than echo a blank line then it's more complicated and you will need to give more information. Over in programming.
0
Response Number 3
Name: Ewen Date: September 18, 2008 at 15:53:32 Pacific
Reply:
NoIdea... lurkswithin has directed the poster to the proper forum, your answer will more tna likely cause a double posting which is not allowed.
Once I thought I was wrong, now I'm not so sure!
0
Response Number 4
Name: toast (by NoIdea) Date: September 19, 2008 at 00:49:26 Pacific
Summary: This should do what you are looking for. set objWS = CreateObject("Wscript.Shell") Set fsob=CreateObject("Scripting.FileSystemObject") strNewLine = "New Line to Write" strFileName = "c:\test.ini" ...
Summary: VB Script, and I can't believe you posted the same thing 3 times under different titles, Instead of figuring out how to re-word your question, maybe you should have done some Googling to find the code...
Summary: That is beautiful, it actually wrote over line 7 becuase of the whole starting with line 0 thing, but that is exactly what I was looking for. When you came up with the solution I was actually trying ...