for path, file_dir, files in os.walk(r'指定路径'): for file_name in files: print(os.path.join(path, file_name))