[Tutor] Backupfile program. Help. Thanks.

shimon gurman simong1080 at gmail.com
Sun Sep 2 19:10:17 CEST 2007


Can someone explain to me why this program isnt working? i.e. I always
get 'backup failed'?
This is a program from byte of python tutorial and im using windows xp.




import os, time


source = ['d:\\python']


target_directory = 'd:\\python1'

target = target_directory + time.strftime('%Y%m%d_%H%M%S') + '.zip'

zip_command = "zip -qr '%s' %s" % (target, ' '.join(source))
print zip_command


if os.system(zip_command) == 0:
    print 'Successful backup to', target
else:
    print 'Backup FAILED'
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20070902/3419ec32/attachment.htm 


More information about the Tutor mailing list