Question: save varibles created in do loop to separate files.

I Have a proc that creates some very long lists.
I would like to be able to store each of these lists with the same name in different indexed files.

What I would like to do looks something like...

fd:=["file1.m", "file2.m", ..., "filen.m"]

for i from 1 to n
do
proc(user defined variables)
save variable1,vaiable2, ...,variablem, fd[i]
end do:

This however doesn't work.

I would then like to be able then to run proceedures on these variables from each file.

something like

for i from 1 to n
do

read fd[i]
proc1(in terms of saved variables)
end do:

I don't know if this is a silly question...I have tried using other fucntions like wirteto, but have had no luck.

Thanks ahead of time

Please Wait...