read_plus <- function(flnm) { read_csv(flnm) %>% mutate(filename = flnm) } tbl_with_sources <- list.files(pattern = "*.csv", full.names = T) %>% map_df(~read_plus(.))