Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Append string to text file
Message
From
16/11/2001 06:14:41
Lloyd Grant
Meridian Legal Systems
Buxton, United Kingdom
 
 
To
14/11/2001 23:34:06
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00581898
Message ID:
00582634
Views:
21
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"
Previous
Reply
Map
View

Click here to load this message in the networking platform