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/)
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)