select txt file from dropdown option

You can use list.filesto get the file names of the .txt files. Then pass that result to shiny::selectInput to pick the file you want.

If you want help with the actual code, please try a reprex like in this link.