发布时间:2019-08-26 07:19:56编辑:auto阅读(2173)
- import os
- import time
- source='C:\\Linda\\Test\\Python\\source'
- target_dir='C:\\Linda\\Test\\Python\\backup\\'
- target=target_dir + time.strftime('%Y%m%d%H%M%S')+'.rar'
- print(target)
- rar_command = "winrar a %s %s"%(target,source)
- print (rar_command)
- if os.system(rar_command)==0:
- print ('Succeed to backup to', target)
- else:
- print ("Backup FAILED")
上一篇: cPanel虚拟主机上运行Python的
下一篇: centos7.3更换python版本-
50958
50341
40956
37826
32289
29179
28069
22897
22858
21191
1051°
1728°
1410°
1349°
1611°
1439°
2095°
3637°
3563°
2510°