Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Append string to text file
Message
De
16/11/2001 06:14:41
Lloyd Grant
Meridian Legal Systems
Buxton, Royaume Uni
 
 
À
14/11/2001 23:34:06
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00581898
Message ID:
00582634
Vues:
23
The SET TEXTMERGE command is perfect for adding to an existing text file. Have a play with this code.

*-- Pick the file to add text to
SET TEXTMERGE TO "C:\MY TEXT FILE.TXT" ADDITIVE

*-- Turn text merge on
SET TEXTMERGE ON NOSHOW

*-- Add the text to the file
\\this text will be added to the end of "my text file.txt"
\so will this
\also you can put VFP variables in <> <>
\as long as they are enclosed in cheverons
\the single slash and double slash have different meanings
\so look them up in the help.
\Don't forget the ADDITIVE clause on the SET TEXTMERGE TO

*-- Turn text merge off
SET TEXTMERGE OFF
SET TEXTMERGE TO

*-- View output
MODI COMM "C:\MY TEXT FILE.TXT"
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform