title: Zip multiple, specific folders into one zip file
body: <p>I have a bunch of folders full of data and I need specific ones to be sent to a zip folder. I can move them with a batch file but it does not automatically zip and then I have redundancy. I also tried a solution I saw.</p>
  
  <pre><code>import os
  import zipfile    
  
  def zipit(folders, zip_filename):
      zip_file = zipfile.ZipFile(zip_filename, 'w', zipfile.ZIP_DEFLATED)
  
      for folder in folders:
          for dirpath, dirnames, filenames in os.walk(folder):
              for filename in filenames:
                  zip_file.write(
                      os.path.join(dirpath, filename),
                      os.path.relpath(os.path.join(dirpath, filename), 
  os.path.join(folders[0], '../..')))
  
      zip_file.close()
  
  
      folders = [
          "\Users\andria.baunee\Desktop\New folder",
          "\Users\andria.baunee\Desktop\New folder (2)",
          "\Users\andria.baunee\Desktop\New folder (3)"]
  
  
      zipit(folders, "\Users\andria.baunee\Desktop\hooray.zip")
  </code></pre>
  
  <p>Nothing seemed to happen.</p>