batch files to add or replace a word/line in a text file
<p>I made this batch file to write in a text file:</p>

<pre><code>rem Saved in E:\Downloads\dat\currentstate.bat
@echo off
@echo Current State&gt; currentstate.txt
@echo League&gt;&gt; currentstate.txt
</code></pre>

<p>So the output right now in the txt is:</p>

<pre><code>Current State
League
</code></pre>

<p>1st batch file: How can I make a batch file in order to add the word "camera" after the last line of any txt file. I would like to run the new batch file and my output to be:</p>

<pre><code>Current State
League
Camera
</code></pre>

<p>2nd batch file: How can I make a batch file this time to replace everything in the first line of any txt file (in my example it happens to be "Current State") with the word "workbook" so the output to be:</p>

<pre><code>workbook
League
Camera
</code></pre>

<p>I searched a lot in the forum/web but i couldn't find answers to my questions. Sorry for the double questioning and thanks in advance.</p>