# -*- coding: utf-8 -*-
import os
import time
source = ['D://vooyo//prj//WVM']
target_dir = 'H://'
for i in source:
print 'dir = ',i
target = target_dir +'wvm'+time.strftime('%Y%m%d%H%M%s') + '.zip'
zip_command = "rar a %s %s" % ( target, ' '.join(source) )
print zip_command
if os.system(zip_command) == 0:
print '备份成功'
else :
print os.system(zip_command)
print '备份失败'