The path has to exist too, else it won't work.
Have a gander at this (edited to actually make it work
):
sync on : backdrop on
variable$="" : loaded$=""
if file exist("E:file.txt")=1 : delete file "E:file.txt" : endif
make file "E:file.txt"
while variable$=""
if shiftkey()=1
input "Input here:",variable$
open to write 1,"E:file.txt"
write string 1,variable$
close file 1
else
text 0,0,"Press shift to begin.."
endif
sync
endwhile
open to read 1,"E:file.txt"
read string 1,loaded$
close file 1
do
text 0,0,"variable$ = "+variable$
text 0,20,"loaded$ = "+loaded$
sync
loop
It saves directly to E:, so you'll have to adjust to suit your program.