Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Appending text to low level file
Message
From
01/07/1999 16:42:07
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00236407
Message ID:
00236705
Views:
10
>>Hello,
>>I want to create a error log file, but I don't know how to write to a file without loosing the existing text.
>>Is there a easy way to write "additive" to file?
>
>If you use ?/?? for output to a file using SET PRINTER, you can:
>
>SET PRINTER TO File name ADDITIVE
>SET PRINTER ON
>
>You can also use
>
>SET ALTERNATE TO File Name ADDITIVE
>SET ALTERNATE ON
>
>to do the same thing
>
>If you use low-level file I/O, you can use an FOPEN() if the file exists to open the file for output, and then immediately do an FSEEK() to get to the end of file, something like:
>
>nFH = FOPEN('C:\Some\Text\File',12) && open read-write, buffered
>=FSEEK(nFH,0,2) && Move to end of file

And then
_text=nFH

And after this you can use the \ and \\ and Text ... EndText and TextMerge features. BTW, the Set Text To < filename > should also have the Additive clause.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform