def getfile(dir_file): baseUrl = dir_file fileList = [] list = os.listdir(baseUrl) for i in range (0, len(list)): path = os.path.join(baseUrl,list[i]) if os.path.isfile(path): fileList.append(list[i]) else: pass return fileList
def getfile(dir_file): baseUrl = dir_file fileList = [] list = os.listdir(baseUrl) for i in range (0, len(list)): path = os.path.join(baseUrl,list[i]) if os.path.isfile(path): fileList.append(list[i]) else: pass return fileList