Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Appending text to a low-level text file
Message
From
13/12/2000 11:01:16
 
 
To
13/12/2000 10:52:13
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00452846
Message ID:
00452857
Views:
28
Joe,

>Is there a way I can append text to an existing low-level text file (one that I've created with FCREATE and/or opened with FOPEN) without overwriting the text in it?

You have the concept of a "file pointer" in the low-level functions, which points to the position in the file that the next FWRITE will overwrite. Using FREAD, you can move the file pointer to the position you want, in combination with FEOF to test if you are at the end of the file.

Play with those a bit and you should find what you want.

For example, FREAD(nFileHandle, 8) would read the first 8 characters, so an FWRITE issued after that would start writing at the 9th character.
David Stevenson, MCSD, 2-time VFP MVP / St. Petersburg, FL USA / david@topstrategies.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform