Read and write files.



Hi everyone, I need some help.

I have 5.000 files, each one containing a matrix. For each file i need
maxima read the matrix, and print a graph.
Files has numerical names (1,2,3,4,5...) and i want maxima read file 1
and print graph in jpg-format. The pic name has to be the same as imput
file-name.

Is possible to use a for instruction to reach this result?

for examble

for i:1 step 1 thru 5000 
do (
....
read_matrix("...path.../i-th file");
.....
draw2d( ... , file_name = "...path.../i-th file", ...)
)


Thanks
MR