def Main():
oldPath = input('please input folder path?')
newPath = oldPath+'-backups'
os.makedirs(newPath)
fileNames = os.listdir(oldPath)
pool = Pool(5)
queue = Manager().Queue()
for name in fileNames:
pool.apply_async(CopyFile,args=(oldPath,newPath,name,queue))
num = 0
allNum = len(fileNames)
while num<allNum:
queue.get()
num += 1
copyRate = num/allNum
print('\r??copy???%.2f%%'%(copyRate*100),end='')
print('\n ???copy?')
评论列表
文章目录