You can use something like this, I cant test the solution since you are not providing any sample of the data or file names so you will have to adapt it to your actual scenario.
library(tidyverse)
library(stringr)
list_of_files <- list.files(path = "path/to/your/files",
recursive = TRUE,
pattern = ".txt$",
full.names = TRUE)
df <- list_of_files %>%
setNames(nm = .) %>%
map_df(~read.csv(file = .x), .id = "participant") %>%
mutate(participant = str_extract(participan, "VP\\d{2,3}")
)