make a list of all files in folder python code example
Example 1: os list all files in one dir
import glob
print(glob.glob("/home/adam/*.txt"))
Example 2: list directory in python
from os import listdir
## Prints the current directory as a list (including file types)
print(os.listdir())