0%

python将大文件夹拆分成小文件夹

1
2
3
4
5
6
import os
os.system("mkdir pic_move1;mkdir pic_move2")
plist = next(os.walk("pic_move"))[2]
print(len(plist))
for i in range(5000):
os.system("mv ./pic_move/"+plist[i]+" ./pic_move1/")

依次类推完成转移