How to read and append text to each line from a text file in Javascript
<p>here is what i currently have:</p>

<pre><code>    var fileNameA = "test.txt";

    fs = new ActiveXObject("Scripting.FileSystemObject");
    f = fs.GetFile(fileNameA);
    is = f.OpenAsTextStream( fileNameA, 8, true, 0);

    while( !is.AtEndOfStream ){
        var x;
        x = is.ReadLine();
        x += fileNameA;
        is.WriteLine(x);
    }
    is.Close();
</code></pre>

<p>However, it will not do what i intend.  Is there another way to approach this?</p>

<p>I intend it to do this:</p>

<pre><code>TextComingIn;
</code></pre>

<p>append file name to this line</p>

<pre><code>TextComingIn;FileNameString
</code></pre>

<p>Thanks</p>
