for i in range(101,110):
n = repr(i) + '.txt'
file = open('c:\\ip\\' + n, 'w')
文章标签 python批量建立文件夹 python 文章分类 Python 后端开发
for i in range(101,110):
n = repr(i) + '.txt'
file = open('c:\\ip\\' + n, 'w')
本文介绍基于Python语言,读取一个文件夹,并将其中每一个子文件夹内符合名称要求的文件加以筛选,并将筛选得到的文件复制到另一个目标文件夹中的方法~
可是你们知道写在 Jupyter Notebook 中的代码存储在电脑的哪里吗?是不是很多读者不知道?想要知道也很简单,只需要在 Jupyter Notebook 中输入如下代码,然后运行。
我在图像处理时,遇到某些函数读路径不能有中文名,比如opencv。当然有其他更方便的解决方法。我这里直接重命名文件,也挺快的。
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M