def get_files_by_ymd(dir_path, time_start, time_end, ext=None, pattern_ymd=None):
    '\n    :param dir_path: 文件夹\n    :param time_start: 开始时间\n    :param time_end: 结束时间\n    :param ext: 后缀名, \'.hdf5\'\n    :param pattern_ymd: 匹配时间的模式, 可以是 r".*(\\d{8})_(\\d{4})_"\n    :return: list\n    '
    files_found = []
    if (pattern_ymd is not None):
        pattern = pattern_ymd
    else:
        pattern = '.*(\\d{8})'
    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
            re_result = re.match(pattern, file_name)
            if (re_result is not None):
                time_file = ''.join(re_result.groups())
            else:
                continue
            if (int(time_start) <= int(time_file) <= int(time_end)):
                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_ymd: 匹配时间的模式, 可以是 r".*(\d{8})_(\d{4})_"
:return: list
def get_files_by_ymd(dir_path, time_start, time_end, ext=None, pattern_ymd=None):
    '\n    :param dir_path: 文件夹\n    :param time_start: 开始时间\n    :param time_end: 结束时间\n    :param ext: 后缀名, \'.hdf5\'\n    :param pattern_ymd: 匹配时间的模式, 可以是 r".*(\\d{8})_(\\d{4})_"\n    :return: list\n    '
    files_found = []
    if (pattern_ymd is not None):
        pattern = pattern_ymd
    else:
        pattern = '.*(\\d{8})'
    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
            re_result = re.match(pattern, file_name)
            if (re_result is not None):
                time_file = .join(re_result.groups())
            else:
                continue
            if (int(time_start) <= int(time_file) <= int(time_end)):
                files_found.append(os.path.join(root, file_name))
    files_found.sort()
    return files_found