Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
FileSystemObject - Text File problems
I have the following code. At the moment, the code just prints the entire contents of a text file. However, it does not take into account lines and I have too many text files to go through them adding
to the end of every line...
Is there some sort of loop that can do this for me?
I tried something alond the lines of
var fso = new ActiveXObject("Scripting.FileSystemObject");
var ofo = fso.OpenTextFile("somefilewithiteration.txt");
for (i=0; i<ofo.length; i++)
text += ofo.ReadLine();
Is there an equivelent NextLine() function or something like that? At the moment, and as far as I can remember, I have only been able to use ReadLine() to read line 1 and then it gives up. As a temporary solution to my problem, I use the ReadAll() method, but that doesn't print a CRLF for the end of every line... :(
Anyone got some code that can fix this?
Thanks in advance,
-( Aaron )-
"Alcohol aint the answer, but atleast you forget the question"
0 · ·