You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
837 B
24 lines
837 B
# -*- coding: utf-8 -*-
|
|
"""把 bruno-out 下三个子目录复制到文档仓 A4 客户管理/客户详情/(目标子目录不存在则创建)。"""
|
|
import io, sys, shutil, os
|
|
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
|
|
|
|
SRC = r'd:\code\crm-backend-matt\.scratch\customer-contact-graph\bruno-out'
|
|
DST = r'D:\code\crm-api-docs\A4 客户管理\客户详情'
|
|
|
|
total = 0
|
|
for sub in os.listdir(SRC):
|
|
s = os.path.join(SRC, sub)
|
|
if not os.path.isdir(s):
|
|
continue
|
|
d = os.path.join(DST, sub)
|
|
os.makedirs(d, exist_ok=True)
|
|
n = 0
|
|
for name in os.listdir(s):
|
|
if not name.endswith('.bru'):
|
|
continue
|
|
shutil.copy2(os.path.join(s, name), os.path.join(d, name))
|
|
n += 1
|
|
print(f' + {sub}\\{name}')
|
|
total += n
|
|
print(f'OK 共复制 {total} 个 .bru')
|
|
|