Skip to content

Instantly share code, notes, and snippets.

@ChillarAnand
Created August 19, 2014 13:02
Show Gist options
  • Save ChillarAnand/a1660864a40d04676974 to your computer and use it in GitHub Desktop.
Save ChillarAnand/a1660864a40d04676974 to your computer and use it in GitHub Desktop.
unzip_files.py
def unzip_files(path):
"""
Unzip the files in the given location & remove zip files.
"""
zip_files = [files for files in listdir(path)]
with cd(path):
for zip_file in zip_files:
commands = [["7z", "e", zip_file], ["rm", zip_file]]
for command in commands:
call(command, stdout=open(devnull, 'wb'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment