list of all files in folder python code example
Example 1: python get all file names in directory
import glob
print(glob.glob("/home/adam/*.txt"))
Example 2: get list file in folder python
lstJson = [f for f in os.listdir(str(self.pathJson)) if f.endswith('.json')]
return lstJson