Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Determining size of (output) text file?
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Title:
Determining size of (output) text file?
Miscellaneous
Thread ID:
00016085
Message ID:
00016085
Views:
97
I'm looking for the best way to:
1. Stream text to an output file, and...
2. Use as much of VFP's ease-of-use as possible to do so (such as the "?" and the "\" operators), and...
3. (the problem) I need as much awareness as possible as to the size of the output file while it is growing. I need to know the EOF position (size of file in bytes) as the file is incrementally growing.

What I have found:

- Using SET PRINT TO filename. For some reason, the line terminators are not CRLFs, but only LFs. You can use the PROW() function to get the current line number. No way to get the actual byte count that I know of.

- Using SET ALTERNATE TO filename. The line terminators are CRLFs.. You cannot use the PROW() function to get the current line number. No way to get the actual byte count that I know of.

- I have not been able to get access to the file handle that VFP uses for either of SET Alternate or Set Print.

- Likely the *only* solution, but still not certain: Use the _Text system memory variable, which connects low-level file I/O capabilities with VFP's textmerge facilities (but not the "?" operator). VFP doesn't actually say if you can mix LL file i/o (using Fread, FWrite, FSeek, etc) with actual textmerge operations such as "\" and "\\". Anybody know?
Thanks!
Next
Reply
Map
View

Click here to load this message in the networking platform