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.
22 lines
647 B
22 lines
647 B
|
2 days ago
|
import io, sys, os
|
||
|
|
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
|
||
|
|
|
||
|
|
root = r'E:\code\crm-api-docs'
|
||
|
|
for d in sorted(os.listdir(root)):
|
||
|
|
p = os.path.join(root, d)
|
||
|
|
tag = 'D' if os.path.isdir(p) else 'F'
|
||
|
|
print(tag, d)
|
||
|
|
|
||
|
|
print('--- A4 ---')
|
||
|
|
a4 = os.path.join(root, 'A4 客户管理')
|
||
|
|
for dirpath, dirs, files in os.walk(a4):
|
||
|
|
rel = os.path.relpath(dirpath, a4)
|
||
|
|
print('DIR', rel, '| files:', files)
|
||
|
|
|
||
|
|
print('--- A3 subdirs ---')
|
||
|
|
a3 = os.path.join(root, 'A3 商机管理')
|
||
|
|
for d in sorted(os.listdir(a3)):
|
||
|
|
p = os.path.join(a3, d)
|
||
|
|
if os.path.isdir(p):
|
||
|
|
print('==', d, '==', len(os.listdir(p)), 'entries')
|