as a toy example : for (i in 1:nbfiles) { fullname = paste("myfile",i, sep=""); write.table(intable,fullname,col.names=F,row.names=F,quote=F); } see ?paste hih