![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
办公助手
Spider_coder
这个作者很懒,什么都没留下…
展开
-
批量对文件夹中的文件进行重命名(筛选特定条件命名)
#coding=gbkimport osimport sysdef rename(): path = input("请输入路径(例如D:\\\\picture):") name=input("请输入开头名:") startNumber = input("请输入开始数:") fileType = input("请输入后缀名(如 .jpg、.txt等等):") filelsit=os.listdir(path) print(filelsit) cou原创 2021-09-29 17:40:27 · 705 阅读 · 0 评论 -
批量对文件进行重命名
#coding=gbkimport osimport sysdef rename(): path=input("请输入路径(例如D:\\\\picture):") name=input("请输入开头名:") startNumber=input("请输入开始数:") fileType=input("请输入后缀名(如 .jpg、.txt等等):") print("正在生成以"+name+startNumber+fileType+"迭代的文件名") count转载 2021-09-27 10:42:54 · 200 阅读 · 0 评论 -
如何批量创建空的文件夹
import ospath="F:\\creat\\"name="9月"end="日"for i in range(1,21): print(i) filename=path+name+str(i)+end print(filename) os.makedirs(filename) print(filename+"has finished")print("mission end")原创 2021-09-24 10:08:44 · 419 阅读 · 0 评论