PYTHON list only .txt files in a dir code example
Example 1: get list of files in directory python
import os
path = '/folder1/folder2/'
files = os.listdir(path)
Example 2: python read file list from directory
from shutil import copyfile
copyfile(src, dst)