Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hi, I am using the FileSystem O

Status
Not open for further replies.

mitch77

Programmer
Nov 16, 2000
42
PT
Hi,

I am using the FileSystem Object to read a file, but i want to know when the end of file occurs.

Thanks, Mitch
 
Hi.

Here is my sample code to detect the end of a text file:


<html>
<Script Language=&quot;JavaScript&quot;>

var ff=new ActiveXObject(&quot;Scripting.FileSystemObject&quot;);

function readT()
{
var fo=ff.OpenTextFile(&quot;f:\\__Personal\\chkBoxes\\mytxt.txt&quot;);
while(fo.AtEndOfStream == 0)
{
alert(fo.ReadLine());
}

}

</Script>
</html>


regards, Kirilla
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top