Here's a simple example:
set filenames = {"file1.txt","hypercube43","input.txt"};
param n integer > 0;
param a {1..n} >= 0;
for {f in filenames} {
reset data;
read n <(f);
read {j in 1..n} a[j] <(f);
display a;
}
If the filenames are going to change frequently, then instead of giving their names in the model, you could read the members of set "filenames" from a file, too -- either in AMPL text file format (using "data") or unformatted text (using "read").
(If every file contains the same number of data values, then for this example you don't need the "reset data;" and "read n <(f);" inside the loop.)