>I'm trying to use Set Alternate to capture some ? output in my prg.
>
>Set Alternate On
>Set Alternate To C:\Temp\001.txt
>
>run a prg
>
>Set Alternate Off
>Set Alternate To
>Modi Comm C:\Temp\003.txt
>
>
>It opens the file, but it is mostly empty, except for a few characters on the first line.
>
>It has a space and what looks like an arrow pointing the right.
>
>What in the world am I possibly doing wrong?
>
>VFP9SP2, Win 7, 64-bit
In some of my programs I use the following:
SET ALTERNATE TO (This.DSEXEFolder + [SystemLog.TXT]) ADDITIVE
SET ALTERNATE ON
SET CONSOLE OFF
?tcMessage
SET CONSOLE ON
SET ALTERNATE OFF
SET ALTERNATE TO
The above writes a single line/message to a log file. If you call it more than once you need ADDITIVE, otherwise previous contents are overwritten.
It so happens I'm refactoring some of this code; I'm considering replacing the above with STRTOFILE( ..., 1 ).
Regards. Al
"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov
Neither a despot, nor a doormat, be
Every app wants to be a database app when it grows up