关于我们
技术分享
技术分享
使用Python在Windows下调用Winrar备份文件
使用Python在Windows下调用Winrar备份文件
2014-01-29
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")

- 标签:
-
容灾备份
您可能感兴趣的新闻 换一批
热门文章
现在下载,可享30天免费试用