how to get a list of all files in a folder and subfolders code example
Example 1: get list of all files in folder and subfolders python
for path, subdirs, files in os.walk(root):
for name in files:
print os.path.join(path, name)
Example 2: cmd files in directory
Enter “dir” (without quotes) to list the files and folders contained in the folder.