python3.4批量重命名程序封装
来源:互联网 发布:java axis简单入门 编辑:程序博客网 时间:2024/06/03 15:14
出于工作需要写了一个批量重命名的程序,然后试着封装成winexe文件。
import osprint("Welcome to use this program")print("*"*20)#执行重命名功能path = ''path=input("Please input path: ")old=""new=""old=input("Please input the old filename (only part of it is also accepted): ")new=input("Please input the new filename: ")for file in os.listdir(path): if os.path.isfile(os.path.join(path,file))==True: newname = file.replace(old,new) os.rename(os.path.join(path,file),os.path.join(path,newname))#打印重命名后的文件名列表 for file in os.listdir(path): if os.path.isfile(os.path.join(path,file))==True: print(file) print("Succeed")
上午刚好复习了一下input输入,正好用上。
听说pyinstaller封装不错,于是也刚好试了一下。最一开始提示说有错误,原来是缺少一个piwin32组件。去官网下载后再次用cmd运行,然而还是缺少组件。又查找资料把dll文件添加进系统的path环境,最终成功封装。pyinstaller还是需要更多了解
1 0
- python3.4批量重命名程序封装
- python3批量重命名电影(windows下下载的电视剧)
- 批量文件重命名器BatchRename程序
- 批量重命名
- 批量重命名
- 批量重命名
- 批量重命名
- 批量重命名
- 批量重命名
- 快速的批量修改重命名.net程序的命名空间
- 快速的批量修改重命名.net程序的命名空间
- 快速的批量修改重命名.net程序的命名空间
- 快速的批量修改重命名.net程序的命名空间
- 快速的批量修改重命名.net程序的命名空间
- 快速的批量修改重命名.net程序的命名空间
- 文件名批量重命名、文件后缀名批量重命名
- 批量修改文件名 批量重命名
- 批量重命名文件 (VB)
- 【C/C++学院】0826-文件重定向/键盘输入流/屏幕输出流/字符串输入输出/文件读写简单操作/字符文件读写二进制与文本差别/get与getline挖掘数据/二进制与文本差别/随机位置/多线程初级
- Hadoop之文件副本是如何存储的
- 高通bootloader
- 弹窗口显示html页面
- HTML5--之大话设计测试
- python3.4批量重命名程序封装
- Android Facebook登录的简单实现
- Linux系统编程之fcntl使用
- Interview Prep for xx company
- SVN服务器搭建和使用
- 非阻塞算法-简单的计数器
- hdu 1874 畅通工程续(最短路Dij邻接矩阵)
- php页面编码设置的方法
- iOS objc_msgSend 报错解决方案