given a directory get list of all the files in subdirectory and everythin in python 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: dos dir
dir *.txt *.doc
dir /a:-d
dir /s
dir /s /a:-d
dir > myfile.txt
dir /o:[sortorder]
N : By name (alphabetic).
S : By size (smallest first).
E : By extension (alphabetic).
D : By date/time (oldest first).
- : Prefix to reverse order.