python shutil模块常用方法
来源:互联网 发布:unity3d 做个黑洞 编辑:程序博客网 时间:2024/05/17 09:01
#复制文件shutil.copyfile(‘oldfile’,’newfile’) #oldfile和newfile都只能是文件shutil.copy(‘oldfile’,’newfile’) #oldfile只能是文件,newfile可以是文件也可以是目标目录#复制文件夹shutil.copytree(‘olddir’,’newdir’) #olddir和newdir都只能是目录,且newdir必须不存在移动文件(目录)shutil.move(‘oldname’,’newname’)#删除目录os.rmdir(‘dir’)#只能删除空目录shutil.rmtree(‘dir’)#空目录,有内容的目录都可以删
(学习笔记整理来自潭州 python 不动老师的课程内容)
阅读全文
1 0
- python shutil模块常用方法
- Python: shutil模块 常用api速查表
- Python入门—1模块_2_os与shutil模块常用方法
- Python中 os、shutil 模块实用方法
- python之shutil模块
- Python shutil模块
- python shutil模块学习
- [python] shutil模块
- python shutil模块学习
- python之shutil模块
- Python shutil模块学习
- Python shutil模块
- python shutil模块学习
- 【Python】shutil模块
- python的shutil模块
- Python shutil模块
- Python笔记:shutil模块
- Python中的 shutil 模块
- anatomy of an Http transactions
- Docker安装官方nginx镜像
- CodeForces
- 第八周项目三C/C++数据结构顺序串算法
- HTML 引用
- python shutil模块常用方法
- Binder总体架构分析
- HDU-2844 Coins(完全背包)
- 大数据1-Hadoop架构中的消息传输(ActiveMQ)
- 做个生成和扫描二维码的windows小应用
- MySQL行转列操作
- PyCharm professional 2017激活
- 关于Java 泛型中的 问号
- 使用SSH反向隧道进行内网穿透