Well now, tell me if this helps eh?
You will need to load the file(if it exists), and read all your current data into a string array - :
switch all your string array data as you would like it:
Then save all your array data:
(although I find that save array works better for many things-example not here; this is strictly read and write string arrays)
Ofcourse playing with it- is what makes it yours
dim temp$(100)
if file exist ("temp.txt") then delete file "temp.txt"
open to write 1,"temp.txt"
write string 1,"boogers"
close file 1
print "file saved!"
wait key
dim temper$(100)
open to read 1,"temp.txt"
repeat
read string 1,temper$(i)
inc i
until temper$(i-1)="" and temper$(i-2)=""
close file 1
print "i=";i
print "temper$(i)=";temper$(i)
print
print
print "i-3=;";i-3
print "temp$(i-3)=";temper$(i-3)
print "done"
wait key