摘要: 1 import shutil import os if os.path.exists("wjcl/src/step3/cr"): shutil.rmtree("wjcl/src/step3/cr") os.mkdir("wjcl/src/step3/cr") f1=open("wjcl/src/s 阅读全文
posted @ 2022-05-27 08:15 小染`` 阅读(434) 评论(0) 推荐(0)
摘要: python统计文件夹下不同文件的数量和大小 import os wjzd={} wjsize={} lj="wjcl/src/test" def get_size_type(f_path): global lj files_name = os.listdir(f_path) for name in files_name: file_path 阅读全文
posted @ 2022-05-26 22:37 小染`` 阅读(407) 评论(0) 推荐(0)
摘要: python 文件分类 import os import shutil wj={"图片":".jpeg.jpg.png.jfif","文档":".txt.docx.pdf.gitkeep","音乐":".mp3.wav","影像":".mp4.flv"} lj1="wjcl/src/test2" lj="wjcl/src/ 阅读全文
posted @ 2022-05-26 22:30 小染`` 阅读(107) 评论(0) 推荐(0)