I\'m trying to list all the files in a directories including subdirectories that end with _input.txt.
_input.txt
- folder 1 - a_input.txt - folder 2
To list the matching files in all subdirectories, you can use recursive = TRUE in list.files()
recursive = TRUE
list.files()
list.files(pattern = "_input.txt$", recursive = TRUE)