Guest User

Untitled

a guest
Mar 23rd, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. for elem in os.listdir(DOWNLOAD_DIR):
  2. if elem.endswith('.zip'):
  3. src = os.path.join(DOWNLOAD_DIR, elem)
  4. dst = os.path.join(........)
  5. shutil.move(src, dst)
  6.  
  7. time.sleep(20)
  8.  
  9. zipPath = os.path.join(dst, elem)
  10. zip_ref = zipfile.ZipFile(zipPath, 'r')
  11. zip_ref.extractall(dst)
  12. zip_ref.close()
  13. os.remove(zipPath)
  14. print "Zip file has been extracted."
Add Comment
Please, Sign In to add comment