直接修改copytree的实现即可,如下: #copytree中找到 os.makedirs(dst),加入判断,就这么简单 if not os.path.exists(dst): os.makedirs(dst) 相关文章: 2021-10-17 2022-12-23 2021-04-18 2022-02-10 2022-12-23 2021-10-15 2022-02-02 2021-11-29