--- Quote Start ---
assuming I understood you.
when you use megawizard it generates wrapper for ram block, copy/paste the way it is instantiated inside wrapper then use that for your instantion connecting the relevant file as generic per each block (hand editing the init file).
There might be other better ways but that is what I do.
--- Quote End ---
additionally I suggest you arrange your files into an array so that you can use the generate loop effectively.
type filename_array is array(1 to 10) of string(8 downto 1);
signal sel_file : filename_array := ("myfile01","myfile02",...,myfile10");
and in the loop:
init => sel_file(i);