How to copy a directory and its contents to an existing location using Python?

后端 未结 4 1912
暖寄归人
暖寄归人 2020-12-23 17:04

I\'m trying to copy a directory and all its contents to a path that already exists. The problem is, between the os module and the shutil module, there doesn\'t seem to be a

4条回答
  •  Happy的楠姐
    2020-12-23 17:39

    For highlevel file operations like that use the shutil module and in your case the copytree function. I think that is cleaner than "abusing" distutils.

    UPDATE:: Forget the answer, I overlooked that the OP did try shutil.

提交回复
热议问题