you can passe argument to freefem+= script
like
include "getARGV.idp"
int k=getARGV("-k",1);// default value 1.
real rho = getARGV("-rho",3.14);// default value 3.14
mesh Th= “mesh”+k+".msh";
usage :
FreeFem++ your-script.edp -k 10 -rho 10.5