Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
TXT manipulation
Message
De
23/02/2008 23:04:55
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
23/02/2008 21:07:12
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 8
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01295784
Message ID:
01295807
Vues:
17
>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)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform