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 ...