python
来源:互联网 发布:娶网络女主播 编辑:程序博客网 时间:2024/06/11 18:08
import ospath = 'F:\电影\xxx'drop_str = '【支付宝:xxx 打赏一元 有惊喜哟】'items = os.listdir(path)os.chdir(path)print(os.getcwd())for name in items: print(name) new_name = ''.join(name.split(drop_str)) os.rename(name, new_name)print('-----------------分界线--------------------')items = os.listdir(path)for name in items: print(name)
阅读全文
0 0
- Python
- Python
- Python
- python
- Python
- PYTHON
- Python
- Python
- Python
- Python
- Python
- Python
- Python
- Python
- Python
- Python
- python
- Python
- LeetCode9 Palindrome Number(判断一个数是不是回文数)
- Java IO核心操作(三)
- 图论作业1
- Ajax -- 接受 文本 响应格式的数据
- 【携程2017年笔试题】计算最长奔跑路径长度
- python
- 王爽汇编语言debug命令汇总
- hibernate--8.实体类操作
- 实验2:命令行菜单小程序
- CSDN博客使用MarkDown编辑器bug解决办法
- MyBatis入门学习
- 设计模式之访问者模式
- React Native中页面跳转、打开新页面并关闭当前页面
- java企业级(内置对象)