ausw <- function(fn) { ... } liste <- readLines("files.dat") for( fn in liste ) try( ausw.liste[[fn]] <- ausw(fn) ) ; quit("yes")