Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for elem in os.listdir(DOWNLOAD_DIR):
- if elem.endswith('.zip'):
- src = os.path.join(DOWNLOAD_DIR, elem)
- dst = os.path.join(........)
- shutil.move(src, dst)
- time.sleep(20)
- zipPath = os.path.join(dst, elem)
- zip_ref = zipfile.ZipFile(zipPath, 'r')
- zip_ref.extractall(dst)
- zip_ref.close()
- os.remove(zipPath)
- print "Zip file has been extracted."
Add Comment
Please, Sign In to add comment