Read line per line a txt file with VBS
I'm trying this code: filename = "test.txt" listFile = fso.OpenTextFile(filename).ReadAll listLines = Split(listFile, vbCrLf) For Each line In listLines WScript.Echo line 'My Stuff Next Or this other: filename = "test.txt" Set fso = CreateObject("Scripting.FileSystemObject") Set f = fso.OpenTextFile(filename, ForReading) Do Until f.AtEndOfStream myLine = f.ReadLine WScript.Echo myLine 'My Stuff Loop Why in both cases it echoes all lines at once, and of course I'm unable to work line by line? Any idea? Ekkehard.Horner Your file has funny EndOfLine markers. Let's assume the lines are terminated