evaluation – Running a Mathematica file multiple time with different inputs

I have a code in Mathematica file, which I want to run for large number of times (say 100) in series, and save o/p each time as *.MX file with the name “FileName_n.MX” ( where n is the number 1, 2, 3…100).

While running the file for 100 times, only two input parameters are different, say X and Y. For the nth run, X is a function of n, and Y is the o/p of the (n-1)th file.
Would be thankful for any suggestion to perform this task in easy way.

Of course, one method is the manual one, which I used for smaller number of runs. Where I created multiple files with different X values, imported the last o/p MX file and exported the o/p as MX file .. But this method is tedious for large number of files. Also, since o/p of each file is matrix of 6400X144 elements, I want to run each of the n files separately and have data stored in separate files. Thanks