how to get file list from folder code example
Example 1: get list file in folder python
lstJson = [f for f in os.listdir(str(self.pathJson)) if f.endswith('.json')]
return lstJson
Example 2: get list of files in directory python
import os
path = '/folder1/folder2/'
files = os.listdir(path)