jlbryant
03-04-2003, 12:53 PM
i am using this code to delete some lines from a text file
Open "C:\windows\system\personnel.txt" For Input As #1
Open "C:\windows\system\personnel1.txt" For Append As #2
Do While Not EOF(1)
Input #1, LineStr
Line = Line + 1
If (Line <> 1) Then
Print #2, LineStr
Else
'Ignore the line
End If
Loop
Close #2
Close #1
Kill "c:\windows\system\personnel.txt"
Name "C:\windows\system\personnel1.txt" As "C:\windows\system\personnel.txt"
my problem is when i originaly write the lines to the text file it puts them in like this
"a",#TRUE#
"b",#TRUE#
so on
well the above code deletes the first part like "a" but it won't delete #TRUE#.
whats going on?
Open "C:\windows\system\personnel.txt" For Input As #1
Open "C:\windows\system\personnel1.txt" For Append As #2
Do While Not EOF(1)
Input #1, LineStr
Line = Line + 1
If (Line <> 1) Then
Print #2, LineStr
Else
'Ignore the line
End If
Loop
Close #2
Close #1
Kill "c:\windows\system\personnel.txt"
Name "C:\windows\system\personnel1.txt" As "C:\windows\system\personnel.txt"
my problem is when i originaly write the lines to the text file it puts them in like this
"a",#TRUE#
"b",#TRUE#
so on
well the above code deletes the first part like "a" but it won't delete #TRUE#.
whats going on?