import yaml import os import shutil def copyHistorySession(): source_path5048 = r'D:\sourse' target_path5048 = r'D:\target' if not os.path.exists(target_path5048): # 如果⽬标路径不存在原⽂件夹的话就创建 os.makedirs(target_path5048) if os.path.exists(source_path5048): # 如果⽬标路径存在原⽂件夹的话就先删除 shutil.rmtree(target_path5048) shutil.copytree(source_path5048, target_path5048) print('copy 5048 History Session finished!')
python:复制文件夹及内容(包含子文件夹)到指定目录
最新推荐文章于 2024-05-14 11:32:26 发布