import os

# This is my path
path = r"E:\TestData\CopyMws2"

# to store files in a list
list = []

# dirs=directories
for (root, dirs, file) in os.walk(path):
    for f in file:
        jkl=0
list_contains=os.listdir(path)
jkl=0