Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Go to line in a txt
Message
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00802141
Message ID:
00802146
Views:
26
>I have a file named myfile.txt
>
> 1- How can go to a line of this file ?
>
> 2- How can I replace a line of this file?

It depends what kind of file is it. IF it's fixed lenght file you can calculate offset based on record lenght and line # you want to move to. Than you can use FWRITE() to change the record. Otherwise you can use FGET() to read file line by line and write it out into new file replacing record you want in the process.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform