Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
TXT manipulation
Message
From
23/02/2008 23:04:55
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
23/02/2008 21:07:12
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 8
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01295784
Message ID:
01295807
Views:
16
>Hi.
>Sorry and ignore the other post in ActiveX category.
>I've mistaked in the category.
>---
>I need to open a '.txt' file,
>search information on it, read
>that information and then write
>it back in a 'new txt' file.
>Which is the best way to do this?
>Thanks in advance!

FileToStr() will read the file.

Alines() may also help, since it will convert the result to an array, one array element per line. Since you are not yet using VFP 9, please note that in older versions, arrays are limited to 65,000 elements, which would be about 1000 pages of text.

You can store the result back to file with StrToFile(); all at once, or one line at the time with the "append" option.

HTH,

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform