import os
import shutil
def list_fullpath(dirPath):
paths = []
for i in os.listdir():
paths.append(i)
source_dir = r'D:\0523_merge\0523_only'
dest_dir = r'D:\0523_merge\0523_only_dest'
all_files = []
for root, dirs, files in os.walk(source_dir, topdown=False):
for name in files:
pth = os.path.join(root, name)
all_files.append(pth)
print(pth)
for file_path in all_files:
shutil.copy(file_path, dest_dir)
merge.py
最新推荐文章于 2023-05-31 15:51:36 发布