title: Zipping commands and directory (Windows) Troubles
body: <p>The problem is 'I want a program which creates a backup of all my important files'. </p>
  
  <p>This lesson is located at: <a href="http://www.ibiblio.org/g2swap/byteofpython/read/problem-solving.html" rel="nofollow">http://www.ibiblio.org/g2swap/byteofpython/read/problem-solving.html</a> </p>
  
  <pre><code> import os
  import time
  
  # 1. The files and directories to be backed up are specified in a list.
  source = ['/home/swaroop/byte', '/home/swaroop/bin']
  # If you are using Windows, use source = [r'C:\Documents', r'D:\Work'] or something like that
  
  # 2. The backup must be stored in a main backup directory
  target_dir = '/mnt/e/backup/' # Remember to change this to what you will be using
  
  # 3. The files are backed up into a zip file.
  # 4. The name of the zip archive is the current date and time
  target = target_dir + time.strftime('%Y%m%d%H%M%S') + '.zip'
  
  # 5. We use the zip command (in Unix/Linux) to put the files in a zip archive
  zip_command = "zip -qr '%s' %s" % (target, ' '.join(source))
  
  # Run the backup
  if os.system(zip_command) == 0:
      print 'Successful backup to', target
  else:
      print 'Backup FAILED'
  </code></pre>
  
  <p>I'm using Windows. 
  For # 2, where is this and does it apply to Windows?
  For # 5, I can't find the commands to zip a file for the default windows zipping program. </p>
  
  <p>This would be easy if the lesson explained how to use this with Windows and the zipping commands. Any assistance is appreciated. This is homework reading but It's not helpful when all the applicable tools are not defined.</p>