import os # 原文件后缀名 suffix_name = '.jar.src.zip' # 新文件后缀名 nwe_suffix_name = '.jar' def foo(path1): file_list = os.listdir(path1) for file_name in file_list: if os.path.isfile(path1+file_name): if file_name.find(suffix_name) != -1: index = file_name.fi…