37,720
社区成员
发帖
与我相关
我的任务
分享
os.remove(cPath+'\\'+'t')
os.remove(cPath+'\\'+cName)
os.rename(cPath+'\\ok',cPath+'\\'+cName)
r = 0
while r < 40:
if r < 10:
rr = '0'+str(r)
else:
rr = str(r)
if os.path.exists(cPath+'\\T'+rr) == True:
os.remove(cPath+'\\T'+rr)
r = r + 1
import os
for root, dirs, files in os.walk(top, topdown=False):
for name in files:
os.remove(os.path.join(root, name))
for name in dirs:
os.rmdir(os.path.join(root, name))