python list file in dir code example
Example 1: python list files in current directory
import os
files = os.listdir('.')
print(files)
for file in files:
# do something
Example 2: python read file list from directory
from shutil import copyfile
copyfile(src, dst)