hi everyone
i want to write a data to a txt file with format as:
1 data1
2 data2
....
n ..datan
how i can write the data only to n=1000, if greater than 1000 ,it will begin write overwritten to 1 ,2 ...
hi everyone
i want to write a data to a txt file with format as:
1 data1
2 data2
....
n ..datan
how i can write the data only to n=1000, if greater than 1000 ,it will begin write overwritten to 1 ,2 ...
Check the file size before you write. If it is greater than 1000, seek position to the begin of the file.
You may also need to open file in append mode. Do confirm.
After reaching the 1000 lines, you must create a file from scratch. This is impossible to put 10 characters in place of 5 characters.
Bookmarks