我主要是使用这个模块复制文件和文件夹

用法

# 判断文件/文件夹并复制
for binPath in seconddir.iterdir():
    if binPath.is_file():
        srcPath = binPath.resolve()
        # 复制文件
        shutil.copy(srcPath, inputPath)
    else:
        # 复制文件夹
        shutil.copytree(binPath.resolve(), Path.joinpath(inputPath,binPath.name), dirs_exist_ok=True)

# dirs_exist_os=True:忽略已有文件夹
# Path.joinpath(inputPath,binPath.name):合成文件夹的目的地址