# Iterate millions of input/output file names... foreach (...) { # Execute external command on pairs of input/output file names... system("my_program.exe my_parameter_file.par -option1 -option2 \ $input_file_name $output_file_name"); }