python getting files of a partifular directory code example
Example 1: get all files within multiple directories python
from pathlib import Path
for f in Path().cwd().glob("../*.ext"):
print(f)
# do other stuff
Example 2: get files in directory python
import os
files_and_directories = os.listdir("path/to/directory")