simple question

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?

Konrad Rudolph
03-04-2003, 01:01 PM
use Line Input instead of Input!

rbulph
03-04-2003, 03:56 PM
Konrad,

C'est expres que tu as mal ecrit "incompetent"?

rbulph

Konrad Rudolph
03-04-2003, 04:03 PM
C'est expres que tu as mal ecrit "incompetent"?

non, mais merci pour la remarque

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum