def get_files_by_date(dir_path, time_start=None, time_end=None, ext=None, pattern=None):
    "\n    :param dir_path: 文件夹\n    :param time_start: 开始时间\n    :param time_end: 结束时间\n    :param ext: 后缀名, '.hdf5'\n    :param pattern: 匹配时间的模式\n    :return: list\n    "
    files_found = []
    for (root, dirs, files) in os.walk(dir_path):
        for file_name in files:
            if (ext is not None):
                if ('.' not in ext):
                    ext = ('.' + ext)
                if (os.path.splitext(file_name)[1].lower() != ext.lower()):
                    continue
            if (pattern is not None):
                re_result = re.match(pattern, file_name)
                if (re_result is None):
                    continue
                if (time_start is not None):
                    time_file = ''.join(re_result.groups())
                    if (not (int(time_start) <= int(time_file) <= int(time_end))):
                        continue
            files_found.append(os.path.join(root, file_name))
    files_found.sort()
    return files_found
:param dir_path: 文件夹
:param time_start: 开始时间
:param time_end: 结束时间
:param ext: 后缀名, '.hdf5'
:param pattern: 匹配时间的模式
:return: list
def get_files_by_date(dir_path, time_start=None, time_end=None, ext=None, pattern=None):
    "\n    :param dir_path: 文件夹\n    :param time_start: 开始时间\n    :param time_end: 结束时间\n    :param ext: 后缀名, '.hdf5'\n    :param pattern: 匹配时间的模式\n    :return: list\n    "
    files_found = []
    for (root, dirs, files) in os.walk(dir_path):
        for file_name in files:
            if (ext is not None):
                if ('.' not in ext):
                    ext = ('.' + ext)
                if (os.path.splitext(file_name)[1].lower() != ext.lower()):
                    continue
            if (pattern is not None):
                re_result = re.match(pattern, file_name)
                if (re_result is None):
                    continue
                if (time_start is not None):
                    time_file = .join(re_result.groups())
                    if (not (int(time_start) <= int(time_file) <= int(time_end))):
                        continue
            files_found.append(os.path.join(root, file_name))
    files_found.sort()
    return files_found