python实践,文件备份
来源:互联网 发布:php单例模式 编辑:程序博客网 时间:2024/06/06 09:06
import osimport timesource = ['E:\\001','E:\\002']target_dir = 'E:\\02'target = target_dir + os.sep + time.strftime('%Y%m%d%H%M%S') + '.zip'if not os.path.exists(target_dir): os.mkdir(target_dir)zip_command = 'zip -r {0} {1}'.format(target,' '.join(source))print('Zip command is:')print(zip_command)print('running:')if os.system(zip_command)==0: print('Successful backup to',target)else: print('Backup Failed')
阅读全文
0 0
- python实践,文件备份
- Python实现文件备份
- Python 创建文件备份
- python 文件增量备份
- Python实现文件备份
- Python库文件地址备份
- Python 备份指定目录文件
- 使用python进行文件备份
- Python脚本-文件备份
- Python文件复制,备份,搜索
- python中的文件备份过程
- python 文件读写项目实践
- Python实现文件的全备份和差异备份
- Python应用第一波:文件打包备份
- python 实战:文件备份小程序
- python备份svn服务器文件脚本
- 【python】脚本001-文件备份(模板)
- Python:简单的文件备份脚本
- 简述Spring容器与SpringMVC的容器的异同之处
- 大数据集群部署
- MemoryStream
- Linux权限解读
- 我做的游戏
- python实践,文件备份
- SSU 495. Kids and Prizes(概率DP)
- Java集合细节(一):请为集合指定初始容量
- File初步
- 【python】记自己第一个脚本计算器的诞生
- YOLO v2 在win10+GPU+VS2015下成功编译并演示
- Magic Powder
- 在Linux上搞了一天nginx
- A+B for Input-Output Practice (II) java