maheswar
16th November 2010, 14:01
Hi body,

I have a .txt file with 10 item numbers.
I have to read those item numbers from text file to my session at once, and every time i read one , i want to delete that one from txt file.so after complete reading that file my session will get all items.
ex
.txt
-----
item001
item002
.
.
item010
can anyone help me pls......

george7a
16th November 2010, 14:31
Hi,

Read the whole file and save it in an array. after you have finished, you can delete the file, or write it down again, with one item less (the one you wanted to delete)

- George

rp.chowdary
17th November 2010, 09:37
Use
seq.gets()
seq.puts()

functions for getting solution for writing to the file.

and for reading the line use string.scan()

maheswar
17th November 2010, 10:17
hi body,

thanks for reply......