gh0std0g74,
I ran your myscript.vbs with my test data:
C:\test>type myscript.vbs
Set objFS=CreateObject("Scripting.FileSystemObject")
strFile = "c:\testdata.txt"
Set objFile = objFS.OpenTextFile(strFile)
Do Until objFile.AtEndOfLine
linenumber = objFile.Line
strLine = objFile.ReadLine
If linenumber = 3 Then
WScript.Echo linenumber
csv = Split(strLine,",")
csv(1) = "new value" 'change 2nd field
strLine = Join(csv,",")
End If
WScript.Echo strLine
Loop
objFile.Close
C:\test>cscript /nologo myscript.vbs
1,0,mess,nothing
2,0,mess,nothing
3
3,new value,mess,nothing
4,0,mess,nothing
5,1,mess,nothing
C:\test>
The output for the second field ( flag field ) should be a "0" or "1";
your program put "new value."
Also, the number 3 record remains?
Is testdata.txt not good test data?
C:\>type testdata.txt
1,0,mess,nothing
2,0,mess,nothing
3,0,mess,nothing
4,0,mess,nothing
5,1,mess,nothing
C:\>