read txt file line by line
How do I read a local text file line by line, one line at a time.
I got upto opening a file, and can read whole file at a time. But I want to read just one line at a time. May be have a counter of lenght of the file and read only the counter number line at a time.
var fso = new ActiveXObject( 'Scripting.FileSystemObject' );
f = fso.OpenTextFile( "c:\\mytextfile.txt", 1 );
//txt = f.Readall;
txt = f.Readline;
txt = String(f.Readline).split(/\r?\n/)
Create, Share, and Debug HTML pages and snippets with a cool new web app I helped create: pagedemos.com
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)