Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to eliminate rows in a text file
Message
From
09/01/2002 17:09:02
 
 
To
09/01/2002 15:22:53
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00602648
Message ID:
00602711
Views:
20
Hello Martin.

Is there a way to eliminate rows in a text file using the low-level file functions?

As Garrett says, for VFP 6.0 or later ( untested and off the top of my head )
lcStr = FILETOSTR( 'MyTextFile' )
lnLines = ALINES( laLines, lcStr )
lcStr = ""
FOR lnLine = 1 TO lnLines
  IF < Condition where I want to keep this line >
    lcStr = lcStr + laLines[ lnLine ] + CHR( 13 ) + CHR( 10 )
  ENDIF
ENDFOR
STRTOFILE( lcStr, 'MyTextFile' )
Previous
Reply
Map
View

Click here to load this message in the networking platform