TextStream.Read() : TextStream : MS JScript JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » MS JScript » TextStream »

 

TextStream.Read()









Syntax








textstream.Read(num)



The Read() method reads the num characters starting at the current pointer position.












<html>
    <script language="JScript">
    <!--
    var myFileSysObj = new ActiveXObject("Scripting.FileSystemObject");

    var myInputTextStream = myFileSysObj.OpenTextFile("c:\temp\test.txt"1true);
    var myOutputTextStream = myFileSysObj.OpenTextFile("c:\temp\test2.txt"2true);

    while(!myInputTextStream.AtEndOfStream){
      myOutputTextStream.Write(myInputTextStream.Read(1));
    }
    myInputTextStream.Close();
    myOutputTextStream.Close();
    -->
    </script>
</html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo MS JScript
» TextStream