Please read Please read: make it easier to help you and provide a minimal working example.
If the loop works for you, that’s probably best. If you haven’t already, I would wrap the inner part of the loop in a function so that it looks like this:
function build_and_solve_model(filename)
# ...
end
for file_name in ["a.csv", "b.csv"]
build_and_solve_model(file_name)
end